Dani is writing some arrays in her favorite text editor HackerEdit. Each line of the document describes an array in the following format:
Here is the array's number of elements and are its contents.
Dani wrote arrays in the file and left for lunch. To her dismay, her little brother Nik deleted all the newline characters from the file while she was gone! For example, consider the file in the table below:
Given the contents of Dani's HackerEdit file with all the newlines removed, find the value of (i.e., the number of arrays in the initial file).
Input Format
The first line contains an integer denoting (the number of integers in the file).
The second line contains space-separated integers describing each respective value in the file.
Constraints
Output Format
Print a single integer denoting .
Sample Input 0
11
5 4 5 4 3 3 2 1 4 1 4
Sample Output 0
3
Explanation 0
The file looks like this after removing all the newlines:
After re-adding the newlines where they belong in the file, it looks like this:
Because there are three arrays declared in the reconstructed file, we print as our answer.