J. No 7
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Gunga doesn't like the number 7. Given a positive integer $$$x$$$, try to find the maximum integer smaller than $$$x$$$ that does not contain a 7 on any of its digits.

Input

A single integer $$$x$$$ $$$(1\le x\le 10^4)$$$.

Output

The maximum integer smaller than $$$x$$$ that does not contain a 7 on any of its digits.

Examples
Input
8
Output
6
Input
777
Output
699
Note

In the first example, 6 is the maximum integer smaller than 8 that does not contain a 7 on any of its digits.