#include <iostream>
using namespace std;
int main() {
int a,b;
while(cin>>a){
if(a<=10){
b=a*6;
cout<<b<<endl;
}
else if(a>=11&&a<=20){
b=(a-10)*2+60;
cout<<b<<endl;
}
else if(a>=21&&a<=40){
b=(a-20)*1+80;
cout<<b<<endl;
}
else{
cout<<"100"<<endl;
}
}
return 0;
}