#include <iostream>
using namespace std;
int s,x;
int main()
{
cin>>x;
if (x<=3) s=10;
else if (x<=10) s=10+(x-3)*2;
else s=10+14+(x-10)*3;
cout<<s;
return 0;
}
#include <iostream>
#include <math.h>
using namespace std;
float a;
int x;
int main ()
{
cin>>a;
a=ceil(a);
if (a<=3) x=10;
else if (a<=10) x=10+((a-3)*2);
else x=10+14+((a-10)*3);
cout<<x<<"元";
return 0;
}
#include <iostream>
using namespace std;
int x,s;
int main()
{
cin>>x;
if (x<=3) s=10;
else if (x<=10) s=10+(x-3)*2;
else if s=10+14(x-10)*3;
cout<<s;
return 0;
}