#include <iostream>
using namespace std;
int main(int argc, char** argv) {
unsigned int a,b,n;
cin>>n;
if(n<=10){
cout<<n*6<<endl;
}else if(n>=40){
cout<<100<<endl;
}else if(n>20){
a=n-20;
cout<<80+a*1<<endl;
}else if(n>10){
b=n-10;
cout<<60+b*2<<endl;
}
return 0;
}