#C9470. Maximum Sum of Unique Digits

    ID: 53567 Type: Default 1000ms 256MiB

Maximum Sum of Unique Digits

Maximum Sum of Unique Digits

You are given a string s consisting only of digit characters. Your task is to compute the sum of all unique digits present in the string.

If the string is empty, the sum is 0. For instance, in the string "123321", the unique digits are 1, 2, and 3, so the result is 6.

The solution should read the input from standard input (stdin) and print the result to standard output (stdout).

inputFormat

The input consists of a single line containing the string s made up of digits (0-9). The length of s can be zero.

outputFormat

Output the sum of the unique digits found in the input string.

## sample
123321
6