H. Grocery Shopping
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Michael is grocery shopping and must give the cashier at least $$$N$$$ $$$(1\le N\le 10^9)$$$ dollars (if he exceeds his total, his cashier will simply give him the appropriate amount of change). However, Michael does not like the digits 2 and 7, so he does not want to pay an amount wherein any digits are multiples by 2 or 7 (notice that 0 is a multiple of any number!). Find the smallest number where this is possible.

Input

The first line contains an integer $$$N$$$, the minimum amount of dollars Michael will pay.

Output

A single line containing the smallest number that satisfies the constraint.

Examples
Input
2
Output
3
Input
70
Output
91
Input
777777777
Output
911111111