Palindrom2#621

Palindrom2

1 segundo
64 megabytes
Media (≈1350)

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

Entrada

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

Salida

Output the smallest palindrome greater than .

Ejemplos

Ejemplo 1

Loading
Loading