P7933 [COCI 2007/2008 #5] PASCAL

Description

Little Frane is already in the 10th grade, but he still finds learning Pascal in computer class very difficult. The teacher wrote the following Pascal program as homework. Given the input integer $N$, he needs to determine the program’s output. ```pascal readln(N); counter := 0; for i := N-1 downto 1 do begin counter := counter + 1; if N mod i = 0 then break; end; writeln(counter); ``` Please write a program to solve this problem.

Input Format

One line, an integer $N$.

Output Format

One line, the output produced by the program above.

Explanation/Hint

For $100\%$ of the testdata, $1 \le N \le 10^9$. The score of this problem follows the original contest settings, with a full score of $30$ points. Translated by ChatGPT 5