Олимпиадный тренинг

Задача 38274. Mom, I'm a mathematician!


Задача

Темы: Целые числа
And we, meanwhile, are returning to the Moscow-Adler train, where Maxim was nevertheless caught by dad, and three rolls of toilet paper were not released from the window of the first car (“Well, paaaap, well, I was wondering what is longer & mdash; train or paper, don't put it behind your ear.

Now Maxim is sitting in a compartment with his mother. To distract him from thinking through the details of new experiments, his mother — good mathematician — she told Maxim one curious problem ("My students on Wednesday could not solve it, they completely forgot how to count").

Given a number x. Each of its digits must be multiplied by 19, added to the result 40, the resulting number is again multiplied by 19, take the last digit of this product and put it in place of the original digit in the number x. Question: what is the final number?

Maxim, however, solved the problem much faster than his mother expected, and, unfortunately, he was again ready for experiments. Can you?

Input
Given an integer x (0≤x≤10000).

Imprint
Print one number: the answer to the problem that mom told Maxim.
Examples
# Input Output
1 27 27