Time limit
2s
Memory limit
128 MB
A palindrome number is a positive integer that reads the same from left to right and from right to left. 101, 4, and 6666 are palindrome numbers, while 10, 564, and 15452 are not.
Given a positive integer N, find the smallest palindrome number that is greater than N.
The first line contains a positive integer N. N has at most 50 digits, and its first digit is not 0.
Print the smallest palindrome number greater than N.