14699 - Calculation of days   

Description

Write a program to calculate the number of days from January 1, 1970 to a specific date. If the date is invalid or earlier than January 1, 1970, output 0.

Rules of leap year:

  • A year not divisible by 4 is a common year.

  • A year divisible by 4 but not divisible by 100 is a leap year.

  • A year divisible by 400 is a leap year.

  • A year divisible by 1000 is a leap year.

Input

A date.

Ex. 1970

1

5

Output

The amout of days.

Ex. 5

Sample Input  Download

Sample Output  Download

Tags

11410EE 231002



Discuss