C++
A 32-bit signed integer N is read from the keyboard. Write a program that continues reading signed integers from the keyboard until the sum of two consecutive readings (not considering the value N as the first read) is greater than the value N. Determine the number of readings until the condition is met.
Input data:
At first, the value of N
On the second line signed integers separated by spaces.
Output data:
The number of readings obtained until the stopping condition is met.
Example:
Input data:
12397
123 6273 2183 5362 3747 3782 10000 3000
Output data:
7