#include<bits/stdc++.h>
using namespace std;
int main(){
int n,ns;
double ans;
cin>>n;
ans=n;
ns=n-3500;
if(ns<=0) ans-=0;
else if(ns<=1500) ans-=ns*0.03;
else if(ns<=4500) ans-=ns*0.1-105;
else if(ns<=9000) ans-=ns*0.2-555;
else if(ns<=35000) ans-=ns*0.25-1005;
else if(ns<=55000) ans-=ns*0.3-2755;
else if(ns<=80000) ans-=ns*0.35-5505;
else ans-=ns*0.45-13505;
printf("%.2lf",ans);
return 0;
}