Unchanging numbers

For a given digit count n, decide whether the n-digit idempotent number ending in 5 or the one ending in 6 is larger.

Medium5Number theoryMathImplementationNo attempts yetTime limit2sMemory limit512 MB

Problem

For a natural number nn, consider the 10n10^n numbers written with nn digits, from 00...0 (nn zeros) to 99...9 (nn nines). Call such a number an unchanging number if the last nn digits of its square are the same as the number itself.

Whatever the digit count nn is, there are always exactly four unchanging numbers. Two of them are 00...0 and 00...01, and of the other two, one has 5 as its last digit and the other has 6. For n=4n = 4 the unchanging numbers are 0000, 0001, 0625 and 9376. Here 00002=00000^2 = 0, 00012=10001^2 = 1, 06252=3906250625^2 = 390625 and 93762=879093769376^2 = 87909376, and every square ends with the original four digits.

Given the digit count nn, write a program that prints which of the two is larger, the unchanging number whose last digit is 5 or the unchanging number whose last digit is 6.

Input

The first line contains the digit count nn. (1n100001 \le n \le 10000)

Output

Print 5 on the first line if the unchanging number whose last digit is 5 is larger, or 6 if the unchanging number whose last digit is 6 is larger.