#include <bits/stdc++.h>
using namespace std;
long long n;
bool check(long long i) {
  long long ans = 0;
  long long t = n;
  while (t) {
    ans += min(i, t);
    t -= min(i, t);
    t -= t / 10;
    if (2 * ans >= n) {
      return true;
    }
  }
  return false;
}
int main() {
  scanf("%lld", &n);
  bool ok = false;
  long long lb = 0, ub = n;
  while (ub - lb > 1) {
    long long mid = (lb + ub) >> 1;
    if (check(mid))
      ub = mid;
    else
      lb = mid;
  }
  printf("%lld\n", ub);
  return 0;
}
