#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 s=10+14+(x-10)*3;
cout<<s;
return 0;
}
#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>
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 s=10+14+(x-10)*3;
cout<<s;
return 0;
}