#include using namespace std;
int main() {
double d;
cin >> d;
// write your code here......
//cout << round(d) << endl;
int a = (int)d;
double temp = d - (double)a;
if(temp > 0){
if(temp >= 0.44444444444444444444444444444444){
std::cout << a + 1 << std::endl;
}else{
std::cout << a << std::endl;
}
}else if(temp < 0){
if(temp > -0.44444444444444444444444444444444){
std::cout << a << std::endl;
}else{
std::cout << a - 1 << std::endl;
}
}else{
std::cout << a << std::endl;
}
return 0;
}