#include <iostream>
using namespace std;

int main()
{
    int t;
    cin >> t;
    // 每分鐘 3 元計算
    int ori_price = t * 3;
    
    int standard = 299 + (t-300>0? (t-300)*3: 0);
    // 以上等同於
    // if (t < 300)
    // {
    //     standard = 299;
    // }
    // else
    // {
    //     standard = 299 + (t-300)*3;
    // }
    int plus = 699 + (t-750>0? (t-750)*3: 0);
    // 以上等同於
    // if (t < 750)
    // {
    //     plus = 699;
    // }
    // else
    // {
    //     plus = 699 + (t-750)*3;
    // }
    if (t < 100)
    {
        cout << ori_price << endl;
    }
    else if (plus < standard) 
    {
        cout << plus << endl;
    }
    else
    {
        cout << standard << endl;
    }
}   