아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Physics Experiment

면접 대비

시간 제한1초메모리 제한1024 MB

요약
숫자를 원하는 자리에서 여러 번 반올림해 얻을 수 있는 값 중 가장 큰 값을 구한다.
난이도

보통10점 중 5점

유형
그리디, 수학, 구현
정답자
아직 제출이 없습니다

문제

Yunee is taking a physics lab class. One day, after an experiment, Yunee noticed that some figures in the experiment result came out lower than expected. So Yunee decided to manipulate the result by rounding the values several times.

When rounding a number to the ii-th place, it is rounded down if the digit one place right to the ii-th place is less than 55. Otherwise, it is rounded up. For example, rounding 454454 to the nearest tens gives 450450. On the other hand, rounding 454454 to the nearest hundreds gives 500500.

By rounding 454454 to the nearest hundreds and then thousands, we get 454→500→1000454 \rightarrow 500 \rightarrow 1000. This is the maximum value we can get by rounding 454454 zero or more times.

Help Yunee maximize the value in the experiment result by rounding it zero or more times.

입력

The first line contains an integer NN representing the value in the experiment result (1≤N≤1015)(1\le N \le 10^{15}). Note that NN may exceed the 32-bit integer limit.

출력

Output the maximized value by rounding NN zero or more times. The output should not have leading zeros.

예제3

  1. 예제 1

    입력
    454
    
    예상 출력
    1000
    
  2. 예제 2

    입력
    4445
    
    예상 출력
    10000
    
  3. 예제 3

    입력
    1234321
    
    예상 출력
    1234321