#include<iostream>
using namespace std;
int main ()
{
int N, price;
cin >> N;
if (N % 100 > 65)
price += (N / 100 + 1) * 100;
else
{
int a = N % 100;
price += (N/100) * 100;
if (a % 20 > 15)
price += (a / 20 + 1) * 30;
else
{
int b = (a % 20);
price += (a / 20) * 30;
price += b*2;
}
}
cout << price;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbiAoKQp7CiAgICBpbnQgTiwgcHJpY2U7CiAgICBjaW4gPj4gTjsKICAgIGlmIChOICUgMTAwID4gNjUpCiAgICAgICAgcHJpY2UgKz0gKE4gLyAxMDAgKyAxKSAqIDEwMDsKICAgIGVsc2UKICAgIHsKICAgICAgICBpbnQgYSA9IE4gJSAxMDA7CiAgICAgICAgcHJpY2UgKz0gKE4vMTAwKSAqIDEwMDsKICAgICAgICBpZiAoYSAlIDIwID4gMTUpCiAgICAgICAgICAgIHByaWNlICs9IChhIC8gMjAgKyAxKSAqIDMwOwogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIAogICAgICAgICAgICBpbnQgYiA9IChhICUgMjApOwogICAgICAgICAgICBwcmljZSArPSAoYSAvIDIwKSAqIDMwOwogICAgICAgICAgICBwcmljZSArPSBiKjI7CiAgICAgICAgfQogICAgfQoJY291dCA8PCBwcmljZTsKCXJldHVybiAwOwp9