Problem7336--ABC235 —— A - Rotate

7336: ABC235 —— A - Rotate

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

Let xyz denote the 3-digit integer whose digits are x, y, z from left to right.
Given a 3-digit integer abc none of whose digits is 0, find abc+bca+cab.

Input

Input is given from Standard Input in the following format:
$abc$

Output

Print the answer.

Constraints

abc is a 3-digit integer abc none of whose digits is 0.

Sample 1 Input

123

Sample 1 Output

666
We have 123+231+312=666.

Sample 2 Input

999

Sample 2 Output

2997
We have 999+999+999=2997.

Source/Category