#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
if (a>=90)
{
cout << 3*a;
}
else if (80<=a<90)
{
cout << 2*a;
}
else if (70<=a<80)
{
cout << a;
}
else
{
cout << 50;
}
}
/**************************************************************
Problem: 1300
User: xiaomingze
Language: C++
Result: Wrong Answer
****************************************************************/