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