#CCBCHBAHAI0000029. Đếm số phần tử đã đọc (Count the Read Elements)
Đếm số phần tử đã đọc (Count the Read Elements)
Count the Read Elements
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
You are given a one-dimensional array containing exactly valid integers. The physical storage capacity may be larger, but the logical size is the number of elements actually read. Print that logical size.
Input
- The first line contains the integer , the number of array elements.
- The second line contains exactly integers in increasing index order.
Output
Print one integer: the number of valid elements read, which is .
Subtasks
Subtask 1 (20 points): , .
Subtask 2 (30 points): , for every .
Subtask 3 (50 points): , for every .
Examples
Input
6
4 8 15 16 23 42
Output
6
Explanation
The first line gives , and the second line contains exactly six integers. Therefore the logical array size is .