#include <iostream>
using namespace std;
const int TEN = 10;
int main() {
int n;
cin >> n;
for (int i = n; i >= TEN * TEN; --i) {
int num = i;
int zeroCount = 0;
while (num > 0) {
if (num % TEN == 0) {
zeroCount++;
}
num /= TEN;
}
if (zeroCount == 2) {
cout << i;
break;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IFRFTiA9IDEwOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgZm9yIChpbnQgaSA9IG47IGkgPj0gVEVOICogVEVOOyAtLWkpIHsKICAgICAgICBpbnQgbnVtID0gaTsKICAgICAgICBpbnQgemVyb0NvdW50ID0gMDsKICAgICAgICB3aGlsZSAobnVtID4gMCkgewogICAgICAgICAgICBpZiAobnVtICUgVEVOID09IDApIHsKICAgICAgICAgICAgICAgIHplcm9Db3VudCsrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG51bSAvPSBURU47CiAgICAgICAgfQogICAgICAgIGlmICh6ZXJvQ291bnQgPT0gMikgewogICAgICAgICAgICBjb3V0IDw8IGk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiAwOwp9Cg==