#C4384. Sum of Digits from String
Sum of Digits from String
Sum of Digits from String
You are given a string that consists of lowercase letters and digits (0-9). Your task is to write a program that computes the sum of all digit characters present in the string. Letters and any other non-digit characters should be ignored.
Input Format: A single line containing the string.
Output Format: A single integer representing the sum of all digit characters in the input string.
The mathematical formulation for the problem can be written as:
\[ \text{Result} = \sum_{i=1}^{n} d_i \]
where \(d_i\) is the numeric value of the i-th character if it is a digit, and 0 otherwise.
inputFormat
The input consists of a single line. This line is a string containing lowercase letters and digits. It may also contain other non-digit, non-letter characters which should be ignored.
outputFormat
Output a single integer which is the sum of all digit characters found in the string.
## sampleabc123xyz
6