Sum - MarisaOJ: Marisa Online Judge

Sum

Time limit: 1000 ms
Memory limit: 256 MB
Given a string S consisting of letters, digits, and spaces, remove the letters and print the sum of the numbers within the string. The string may contain extra spaces. Write a program that takes as input a string and outputs the sum of the numbers in the string. ### Input - A single line containing the string $S$. ### Output - Print the sum of the numbers within the string $S$. It is guaranteed that the answer does not exceed $10^{18}$ ### Constraints - $1 \le |S| \le 1000$. ### Sample test ``` t1tt23 45 2e30 57 3qq3 ``` Output: ``` 488 ```