Given a natural number $n$, write a program that outputs the smallest number $s$ satisfying all of the following conditions.
A single natural number $n$ ($0 < n < 500000$) is given on one line.
Output the number $s$ described above. If no such $s$ exists for the given $n$, output the single word NAV.