#include <iostream>
using namespace std;
int main() {
float sd, td;
int muc1 = 1000, muc2 = 1500, muc3 = 2000;
cin >> sd;
if (sd <= 50) {
td = sd * muc1;
} else if (sd <= 100) {
td = 50 * muc1 + (sd - 50) * muc2;
} else {
td = 50 * muc1 + 50 * muc2 + (sd - 100) * muc3;
}
cout << td;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long t=0;
if (n<=50) cout << n*1000;
if ((n>50) and (n<=100) cout << 50*1000+(n-50)*1500;
if (n>=101) cout << 50*1000+50*1500+(n-100)*2000;
return 0;
}