Sum of the elements behind

Write a program that reads a sequence of integer numbers and prints how many of them are equal to the sum of all the elements which are behind them.

Input

Input is a sequence of integer numbers.

Output

In a line, print the number of integer numbers of the input sequence that are equal to the sum of all the elements which are behind them.

Observation

Use recursion (not tables).

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:11:33.509Z

© Jutge.org, 2006–2026.
https://jutge.org