solution problem4

palindrome calculation