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