Yesterday at 9:00, the mandatory activities related to the AMPPZ contest began. The schedule contained $n$ activities that followed one after another, lasting $t_1, t_2, \dots, t_n$ minutes respectively. Yesterday at 19:00, the famous hacking contest also took place, and by that time, the participants wanted to already be in the hotel.
Determine how much time the participants had to return to the hotel after the last activity, assuming everything went according to plan yesterday.
Input
The first line contains an integer $n$ ($1 \le n \le 100$), denoting the number of activities.
The second line contains a sequence of $n$ integers $t_1, t_2, \dots, t_n$ ($1 \le t_i \le 500$), denoting the durations of the consecutive activities in minutes.
You may assume that the organizers ensured that all activities in the schedule ended no later than yesterday at 18:59, leaving the participants a positive amount of time to return to the hotel.
Output
Print a single integer — the number of minutes the participants had left to return to the hotel.
Example
Input
10 45 15 180 60 30 15 105 15 30 45
Output
60
Note
The consecutive activities in the schedule were as follows:
| Hours | Activity |
|---|---|
| 09:00–09:45 | Opening |
| 09:45–10:00 | Break |
| 10:00–13:00 | Lecture session |
| 13:00–14:00 | Lunch |
| 14:00–14:30 | Contest organization rules |
| 14:30–14:45 | Break |
| 14:45–16:30 | Practice contest |
| 16:30–16:45 | Break |
| 16:45–17:15 | Practice contest discussion |
| 17:15–18:00 | Dinner |
Exactly 60 minutes remained to return to the hotel before 19:00.