A telemetry dump is a blob of arbitrary text with integers embedded in it. Extract the integers by scanning left to right and repeatedly taking, at the earliest possible position, the longest match of: an optional single - sign immediately followed by one or more digits. Concretely:
- A maximal run of digits is an integer.
- If that digit run is immediately preceded by a
-character, the integer is negative, and that-is consumed as the sign (it cannot also be the sign of any other integer). - Any other characters (letters, spaces, extra punctuation) are skipped.
For example, in 3-5 the scan first reads 3, then reads -5, giving the integers 3 and -5. In --7 only -7 is read (the first - is not followed by a digit).
Print the sum of all extracted integers.
Input format
The entire input is the telemetry text (it may span several lines).
Output format
A single integer: the sum of every extracted integer (0 if there are none).
Constraints
- 0 <= length of the input text <= 5000
- The text uses printable ASCII characters and newlines.