Math is a Physical Education Subject 2

Time limit1sMemory limit1024 MB

Summary
Given n, determine which of the five answer choices (1 to 5) of the original exam problem is correct when 1000 is replaced by n.
Level

Medium4 of 10

Topics
Math, Brute force, Implementation, Number theory
Solved
No attempts yet

Problem

Do you remember this photo?

img1

This photo has been circulating on the internet for a long time, and in last year's Jeondaepeyeon preliminary problem A it was introduced as the exam paper of Seongwon, a high school student who is really bad at math. Please understand that the photo has been edited to be hard to recognize because it may be copyrighted.

With the preliminary date approaching, the problem setters still had not come up with a suitable problem A, so they decided to make a problem by adapting last year's Jeondaepeyeon preliminary problem A. To that end, the setters looked up the problem in the photo and learned that it was problem 26 of the mathematics section of the June 2007 National Joint Achievement Assessment for first-year high school students.

Downloading the exam paper and looking through the problems, the setters found the following problem.

img2

As you might have expected, you must now write a program that outputs the corresponding answer when the number '1000' appearing in the third line of problem 19 above is replaced with an arbitrary natural number.

Input

The first line gives a natural number n (1 ≤ n ≤ 109).

Output

On the first line, print the number of the answer corresponding to replacing the number '1000' appearing in the third line of problem 19 with the natural number n. That is, you must print one natural number from 1 to 5.

Examples2

  1. Example 1

    Input
    3
    
    Expected output
    3
    
  2. Example 2

    Input
    1000
    
    Expected output
    2