Nowadays, most companies use barcodes like the following one to distinguish their products.
The most spread code which tends to become a standard is the EAN-13. This code is formed by 13 digits: the 12 first correspond to the code of the product, and the last one is a digit of control. The digit of control is a very important part of the EAN coding, because it makes possible the elimination of the reading errors.
The digit of control is computed in two steps:
We multiply by 3 the numbers which are in odd positions and we add up the result with the numbers which are in even position. (The digits are numbered from right to left.)
We substract to the result the nearest equal or greater tens.
For instance, the digit of control corresponding to code 544900000099 is computed like this:
Therefore, its digit of control is 6.
Input is a sequence of numbers with 12 digits each one corresponding to different codes of products.
For each product, print in a line the original code plus its digit of control.
Warning: @int@ type may not be enough to store numbers with 12 digits.
Input
544900000099 438763762897 239872879478 009234464800
Output
5449000000996 4387637628972 2398728794782 0092344648000