#K76877. Sum of Odd Digits

    ID: 34740 Type: Default 1000ms 256MiB

Sum of Odd Digits

Sum of Odd Digits

Given an integer (n), compute the sum of all odd digits present in (n). Note that (n) may be negative; in such cases, the sign is ignored. For example, if (n = 123456), then the odd digits are 1, 3, and 5, and their sum is 9. Your task is to write a program that reads an integer from standard input, calculates the sum of its odd digits, and writes the result to standard output.

inputFormat

A single line containing an integer (n).

outputFormat

A single integer representing the sum of all odd digits in (n).## sample

123456
9