#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
using namespace std;
int num[1001];
long long n;
long long check(long long k) {
  long long p = 0, v = 0;
  long long t = n;
  while (t) {
    if (t >= k) {
      p += k;
      t -= k;
    } else {
      p += t;
      t = 0;
    }
    v += t / 10;
    t -= t / 10;
  }
  if (v <= p)
    return 1;
  else
    return 0;
}
int main() {
  cin >> n;
  long long l = 1;
  long long r = 1e18;
  long long ans = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans << endl;
}
