#K2291. Sum of Digits in a String
Sum of Digits in a String
Sum of Digits in a String
Given a string that may contain both letters and digits, your task is to compute the sum of all digit characters in the string. If there are no digits in the input, the result is 0. This can be mathematically represented as: \(\sum_{i=1}^{n}d_i\), where \(d_i\) are the digit values found in the string.
inputFormat
The input consists of a single line containing a string with any characters including letters, digits, and symbols.
outputFormat
Output a single integer representing the sum of all the digit characters from the input string. If no digits are present, output 0.
## sampleabc123
6