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 data
Three-digit positive integer n.
Output data
Print the required sum.
Examples
Input example #1
123
Output example #1
1332