← Problem book: C Lesson 53 of 96 · 10 XP

Until zero

Theory and problem statement

Machine translation, not yet reviewed by a native speaker.

A line contains integers separated by spaces; the last of them is 0, which marks the end of the input and is not counted. Print, separated by a space, how many numbers there were before the zero and what their sum is.

Example

Input:

3 5 2 0

Output:

3 10

Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.