Shopping center#11088

Shopping center

1 Sekunde
128 Megabyte
Sehr leicht

Candice wants to go to the mall to hang out with Jeremy. She looked at the bus schedule and found out that buses leave from their house in the direction of the shopping center today, -th of them will stop near their house in t_i minutes from the current moment and it will take l_i minutes to go from home to shopping center. Help Candice determine the earliest time she can arrive at the mall.

Eingabe

The first line contains one integer n~(1 \le n \le 100) - the number of buses.

The next lines contain two integers t_i and l_i~(1 \le t_i, l_i \le 100) - the number of minutes that will pass before the -th bus will pass Candice's house, and the number of minutes that the -th bus will travel from the house to the mall.

Ausgabe

Print a single integer, the minimum number of minutes that Candice will need to arrive at the shopping center.

Beispiele

Beispiel 1

Loading
Loading