#include <bits/stdc++.h>
using namespace std;
bool check(long long n, long long k) {
  long long eat = 0;
  for (long long cn = n; cn > 0;) {
    eat += min(cn, k);
    cn -= min(cn, k);
    cn -= cn / 10;
  }
  return 2 * eat < n;
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long ans = 0;
  for (long long step = 1; step > 0; step >>= 1)
    for (; check(n, ans + step); ans += step, step <<= 1)
      ;
  printf("%lld\n", ans + 1);
  return 0;
}
