#include<iostream>using namespace std;unsigned short in;main(){ while(cin>>in){if(in<=10)cout<<in*6<<endl;else if(in>=10&&in<=20)cout<<60+(in-10)*2<<endl;else if(in>=20&&in<=40)cout<<80+(in-20)<<endl;elsecout<<100<<endl;}}