#include <iostream>
using namespace std;

const int TEN = 10;

void applyDiscount(int &n) {
    if (n < 50) {
        n -= n / TEN;
    } else if (n <= TEN * TEN) {
        n -= n / TEN * 2;
    }
}

int main() {
    int n;
    cin >> n;
    applyDiscount(n);
    cout << n;
    return 0;
}