checking wether the given number is a palindrome