#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a;
b=a/100000;
switch(b)
{
case 0:cout<<a*0.1<<endl;break;
case 1:cout<<100000*0.1+(a-100000)*0.075<<endl;break;
case 2:
case 3:cout<<100000*0.1+100000*0.075+(a-200000)*0.05<<endl;break;
case 4:
case 5:cout<<100000*0.1+100000*0.075+200000*0.05+\
(a-400000)*0.03<<endl;break;
case 6:
case 7:
case 8:
case 9:cout<<100000*0.1+100000*0.075+200000*0.05+200000*0.03+\
(a-600000)*0.015<<endl;break;
default :cout<<cout<<100000*0.1+100000*0.075+200000*0.05+200000*0.03+\
400000*0.015+(a-1000000)*0.01<<endl;break;
}
return 0;
}
using namespace std;
int main()
{
int a,b;
cin>>a;
b=a/100000;
switch(b)
{
case 0:cout<<a*0.1<<endl;break;
case 1:cout<<100000*0.1+(a-100000)*0.075<<endl;break;
case 2:
case 3:cout<<100000*0.1+100000*0.075+(a-200000)*0.05<<endl;break;
case 4:
case 5:cout<<100000*0.1+100000*0.075+200000*0.05+\
(a-400000)*0.03<<endl;break;
case 6:
case 7:
case 8:
case 9:cout<<100000*0.1+100000*0.075+200000*0.05+200000*0.03+\
(a-600000)*0.015<<endl;break;
default :cout<<cout<<100000*0.1+100000*0.075+200000*0.05+200000*0.03+\
400000*0.015+(a-1000000)*0.01<<endl;break;
}
return 0;
}