cho.sh
Notes
Loading...

Broken Odometer

Time limit

0.5s

Memory limit

128 MB

Problem

Suhyun's car has an odometer. This odometer cannot display the digit 4, so its displayed values go directly from 3 to 5. For example, if the display shows 15339m and the car actually travels 1 more meter, the display becomes 15350m.

Given the distance shown on the odometer, compute the actual distance that Suhyun's car has traveled.

Input

The first line contains the distance shown on the odometer. The value is an integer between 1 and 999,999,999, inclusive.

Output

Print the actual distance traveled.