#C3531. Parsing and Summing Numbers
Parsing and Summing Numbers
Parsing and Summing Numbers
Given an input string S that may contain letters, digits, and special characters, your task is to parse all integer numbers embedded in the string and compute their sum. This includes both positive and negative integers. If the string does not contain any numbers, output \(0\).
You are required to read the input from standard input (stdin) and output the result to standard output (stdout).
inputFormat
The input consists of a single line containing a string S. The string may include alphabetic characters, digits, and various symbols.
outputFormat
Output a single integer which is the sum of all integer numbers found in the input string. Print the result to standard output.
## sampleabcd123xyz
123