#ABC235A. [ABC235A] Rotate

[ABC235A] Rotate

Score : 100100 points

Problem Statement

Let xyzxyz denote the 33-digit integer whose digits are xx, yy, zz from left to right.

Given a 33-digit integer abcabc none of whose digits is 00, find abc+bca+cababc+bca+cab.

Constraints

  • abcabc is a 33-digit integer abcabc none of whose digits is 00.

Input

Input is given from Standard Input in the following format:

abcabc

Output

Print the answer.

123
666

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

999
2997

We have 999+999+999=2997999+999+999=2997.