Palindromes

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Emilian is a very smart boy who loves palindromes. Radu knows this fact so he gifted his friend a set of n integers, some being palindromes and other not. Emilian was very happy so he asked himself more questions and he will apriciate if you help him answering one of them. What is the sum of all palindrome integers from the set received from Radu?

Given a set of n integers calculate the sum of the palindrome integers.

입력

The first line contains the integer n and the second line contains n integers.

출력

The first line contains only one integer representing the sum of all palindrome integers.

제한

  • 1 ≤ n ≤ 1,000,000
  • All integers from the set are less than 1,000,000,000