Given an array A of length N, find the number of non empty sub-arrays such that sum of all the elements in the sub-array is a palindrome. In other words, you have to find number of pairs such that is a palindrome where .
Input Format:
First line contains an integer, N . Second line contains N space separated integers, , elements of the array A. The sum of all the elements in the array is in the range .
Output Format:
Print an integer, number of non empty sub-arrays such that sum of all the elements in the sub-array is a palindrome.
The 3 sub-arrays are , 1 and 3.