Palindrom2#621

Palindrom2

1 second
64 megabytes
Medium

Given a natural number , find the smallest palindrome greater than . A palindrome is a number that reads the same forwards and backwards.

Input

The program reads a natural number (1 \leq n < 10^{18}).

Output

Output the smallest palindrome greater than .

Examples

Example 1

Loading
Loading