Problem1039--What date is today ?

1039: What date is today ?

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

Write a program to ask user to enter the day of the week, and then ask user what day he wants to know after X days, then output what day of the week after X days. 
(for all the input and output, please use 0 for Sunday, 1 for Monday 2 for Tuesday and so on... )

Input

Two integers in a line, the first one is the day of the week and the second one is X days

Output

One integer which is the day of the week after X days 

Sample Input Copy

2 100

Sample Output Copy

4

HINT

In the example : 2, 100; on Tuesday of a week, after 100 days, it will be Thursday, therefore, output 4

Source/Category