pangfengliu / programmingtasks

programming tasks from my courses
67 stars 17 forks source link

Magic Number #324

Open littlehug opened 7 years ago

littlehug commented 7 years ago

Task Description

A magic expression tests if an integer M satisfies all the following conditions.

  1. M is greater than 0.
  2. M is an even number.
  3. M is greater than 10000, or M is smaller than 1000.

Now given an integer M, please assign the magic expression to another integer N and print the value of N.

Input

The input contains one integer M.

Output

Print the value of N, which is the result of the magic expression of M.

Sample Input 1

514

Sample Output 1

1

Sample Input 2

0

Sample Output 2

0

Sample Input 3

1729

Sample Output 3

0

Sample Input 4

10000

Sample Output 4

0