cf #451(div2) A

A. Rounding

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, Vasya considers it already rounded.

For example, if n = 4722 answer is 4720. If n = 5 Vasya can round it to 0 or to 10. Both ways are correct.

For given n find out to which integer will Vasya round it.

Input

The first line contains single integer n (0 ≤ n ≤ 109) — number that Vasya has.

Output

Print result of rounding n. Pay attention that in some cases answer isn't unique. In that case print any correct answer.

Examples

Input

Copy

5

Output

Copy

0

Input

Copy

113

Output

Copy

110

Input

Copy

1000000000

Output

Copy

1000000000

Input

Copy

5432359

Output

Copy

5432360

Note

In the first example n = 5. Nearest integers, that ends up with zero are 0 and 10. Any of these answers is correct, so you can print 0 or 10.

题目链接:http://codeforces.com/contest/898/problem/A

题目意思:将一个化成最近它的一个以0结尾的数。水题,暴力解答。

#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
	int x;
	cin >> x;
	if(x>5 && x<10)
		cout << 10 << endl;
	else if(x>0 && x<=5)
		cout << 0 << endl;
	else if(x%10>5 && x%10<10)
		cout << x-x%10+10 << endl;
	else
		cout << x-x%10 << endl;
		
	return 0;
		
}

猜你喜欢

转载自blog.csdn.net/qq_38295645/article/details/81429347