1322: USACO 3.2.1 Factorials阶乘数学

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

也许你早就知道阶乘的含义,N阶乘是由1到N相乘而产生,如:
12!= 1 × 2 × 3 × 4 × 5 × 6 × 7 × 8 × 9 × 10 × 11 × 12 = 479,001,600
12 的阶乘最右边的非零位为 6 。
写一个程序,计算 N(1 ≤ N ≤ 50,000,000) 阶乘的最右边的非零位的值。
注意: 10,000,000! 有 2499999 个零。

Input


仅一行包含一个正整数 N 。

Output


一个整数,表示最右边的非零位的值。

Sample Input Copy

12

Sample Output Copy

6

HINT

USACO Training Section 3.2