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

Задача 38214. Difficult task from the exam


Petya has been preparing for the exam in computer science for a long time. He learned to solve all the problems, and he failed to learn how to solve only problem A12. But he hopes to smuggle a laptop into the exam, and he asks you to write a program that will help him. Here's what this difficult task looks like in the 2010 USE demo version:
"A12. Vitya invited his friend Sergei to visit, but did not tell him the code for the digital lock of his entrance, but sent the following 5M5 message:
"In the sequence of numbers 3182, divide all numbers greater than 5 by 2 (discarding the remainder if necessary), and then remove all even numbers from the resulting sequence."
What code did Sergey get by following the steps in the message?"

Input
4 digits are entered in one line without spaces – the sequence contained in the SMS message in the real version of the exam instead of 3182 in the demo version.

Imprint
Print the digital lock code without spaces.
Examples
# Input Output
1 0586 53