Woburn Challenge 2017-18 Round 4 - Junior Division
Bruce Banner is a scientist with a bit of a problem. Whenever he becomes too angry, he transforms into a large green creature with superhuman strength, known as the Hulk! This can be very useful when he's helping the Avengers battle against the forces of evil, but isn't so useful in his daily life.
Natasha Romanova, the Black Widow, has become concerned that Bruce may
be undergoing his transformation too often, so she's going to monitor
his activities in secret over the course of one day. She's noticed that
Bruce's mind essentially keeps track of an "anger level", an integer
which starts at 0 at the beginning of each day. During a particular day,
Bruce will undergo a sequence of
Bruce takes the form of the Hulk whenever his anger level is
Input Specification
The first line of input consists of a single integer,
Output Specification
Output a single integer, the number of times which Bruce Banner transforms into the Hulk.
Sample Input
6
4
4
3
2
-4
1
Sample Output
2
Sample Explanation
Bruce transforms into the Hulk as a result of the
Comments