Sum the Input

Medium · Loops · while read · Arithmetic

Problem

Numbers arrive on standard input, one per line.

Print their total.

Examples

Input: 1\n2\n3
Output: 6

Approaches

Related problems

Start free on Cariara · Coding problems · System design studio

Coding practice is in SolveMe.Open