Home


Contest: Task: Related: TaskB

Score : $100$ points

Problem Statement

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$.

Constraints

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

Input

Input is given from Standard Input in the following format:

$abc$

Output

Print the answer.


Sample Input 1

123

Sample Output 1

666

We have $123+231+312=666$.


Sample Input 2

999

Sample Output 2

2997

We have $999+999+999=2997$.