#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;

    int result;

    if (n <= 500) {
        result = n * 70 / 100;
    }
    else if (n <= 1500) {
        result = 350 + (n - 500) * 40 / 100;
    }
    else if (n <= 4500) {
        result = 750 + (n - 1500) * 15 / 100;
    }
    else if (n <= 10000) {
        result = 1200 + (n - 4500) * 5 / 100;
    }
    else {
        result = 1475 + (n - 10000) * 2 / 100;
    }

    cout << result;

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: