#include <iostream>
using namespace std;
int main(){
int n, score;
while (cin >> n){
if (n<=10) score=n*6;
else if (n<=20) score=60+((n-10)*2);
else if (n<=39) score=80+(n-20);
else if (n>=40) score=100;
cout << score <<endl;
}