#00001B

proizvod

Let P be the product of all numbers from 1 to N. Write a program that calculates the last non-zero digit of number P .


InputThe first and only line of standard input contains the number N (1 <= N <= 10000).

OutputThe standard output should contains the last non-zero digit of number P .


Input:
10
Output:
8
Note: 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 = 3628800 and the last non-zero digit is 8.

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.