EasyRating 1000
Library Fine
A book is returned on date d1 m1 y1 and was due on d2 m2 y2. Fine: 0 if on time; 15 × days late in the same month; 500 × months late in the same year; 10000 if in a later year.
Input
Two lines, each 'day month year'.
Output
One integer.
Sample 1
Input
9 6 2015 6 6 2015
Output
45
Sample 2
Input
1 1 2016 31 12 2015
Output
10000
Output appears here