Rashad has problems with sleeping. Sleeping is most important for scientists and programmers, because their brains work a lot. Huseyn told Rashad a very interesting technique that will help him to sleep: at night Rashad must find the -th interesting number. An interesting number is a number where the last digits of its square are identical to the number itself. For example, is an interesting number, because 376 \cdot 376 = 141376. The last digits of are , and they are identical to the number. While Rashad was trying to find the -th interesting number, he went to his sweet dream. Can you find the -th interesting number?
One integer (1 \leq k \leq 1000).
Print the -th interesting number.
Example 1
Example 2
Example 3
Example 4