#include<bits/stdc++.h>
using namespace std;
int main(){
int c,q;
cin>>c;
if(c>=90){
q=c*3;
cout<<q;
}
if(c>=80 && c<90){
q=c*2;
cout<<q;
}
if(c>=70 && c<80){
cout<<c;
}
if(c<70){
cout<<50;
}
}
/**************************************************************
Problem: 1300
User: zhengzihao3
Language: C++
Result: Accepted
Time:17 ms
Memory:2072 kb
****************************************************************/