#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n; cin >> n; auto f = [&](ll x)->ll { ll t = 1; while (t < x) t *= 10; return x * (t + 1); }; while (n < 1000000000) n = f(n); cout << n << endl; return 0; }