This page is still under construction.

Parts of this page are still being built. What you see may change.

Comma Separated Sum

Time limit1sMemory limit256 MB

Summary
Add all the natural numbers listed in the comma-separated string S.
Level

Easy2 of 10

Topics
String, Math
Solved
No attempts yet

Problem

A string SS made up only of digits and commas is given. SS lists natural numbers in order, separated by single commas. Find the sum of all natural numbers written in SS.

Input

The first line contains the string SS. The length of SS is at most 100, and SS consists only of digits and commas. Each natural number written in SS is at most 1,000,000.

Output

Print the sum of the natural numbers written in SS on the first line.

Examples3

  1. Example 1

    Input
    10,20,30,50,100
    
    Expected output
    210
    
  2. Example 2

    Input
    1
    
    Expected output
    1
    
  3. Example 3

    Input
    1,2,3
    
    Expected output
    6