Problems
Find the sum
Find the sum
For the given three-digit number n find the sum of the three-digit numbers formed by all possible permutations of the digits of the number n, including the identical one.
Input
Three-digit positive integer n.
Output
Print the required sum.
Input example #1
123
Output example #1
1332