OSU!#207

OSU!

1 seconde
256 mégaoctets
Easy

Kostya is an avid gamer who can play computer games day and night without interruption. But this way they get bored very quickly, and he no longer wants to see them. Last night he sat down to play osu!. In this game, you have to hit objects within a set time. Depending on the timeliness of hitting the object, points are awarded:

The score for the game is the sum of the points for all hits in the game. You know that after three consecutive misses, the game ends and the score is reset to zero. A miss is defined as a failure to hit an object. But since Kostya loves osu! very much, he will start a new game if he still has the strength. That is, after losing, the next points (if any) count towards the next game. You are given a sequence of points, help Kostya and tell him the total number of games and the maximum score among all games.

Input

The first line contains a single integer (1 \le n \le 10^5) — the number of points.

The following lines each contain a single integer a_i (a_i \in \{0,100,300\}) — the points for each hit.

Output

Output two integers — the number of games and the maximum score, respectively.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Example 4

Loading
Loading

Note

Explanation for the second example:

The first game starts. The first two points are , so it's a miss. The next move is not a miss, so the game continues. For the next two moves he gets and points respectively, then he misses three times, and the game ends. The score for the first game is .

The second game starts. For the first objects he gets , , and points respectively. But for the th object he gets points, because he missed. The score for the second game is .

Explanation for the fourth example:

The first game starts. Kostya misses three objects in a row and loses. The score for the first game is .

After losing, he decides not to start a new game but to go visit Danil.