The date after N days
Given a date in the form dd.mm.yyyy and a number N, print the date N days later in the same form. Use the usual calendar: a year is a leap year if it is divisible by 4, except years divisible by 100 that are not divisible by 400.
Input
First line: the date dd.mm.yyyy. Second line: N.
Output
The date N days later, as dd.mm.yyyy.
Constraints
The year is from 1900 to 2100; 0 ≤ N ≤ 10^6.
Example 1
Input:
28.02.2024
1
Output:
29.02.2024Example 2
Input:
31.12.2025
1
Output:
01.01.2026Example 3
Input:
15.08.2026
200
Output:
03.03.2027Hint: Either use your language's date library, or step forward month by month: subtract the days left in the current month from N until N fits inside a month, remembering February has 29 days in a leap year.