#include <bits/stdc++.h>
long long sum(long long n, long long k) {
  long long r = 0;
  while (n > 0) {
    long long curr = std::min(n, k);
    r += curr;
    n -= curr;
    n -= n / 10;
  }
  return r;
}
long long solve(long long n) {
  long long low = 0, high = n;
  while (high - low > 1) {
    long long mid = (low + high) / 2;
    if (2 * sum(n, mid) >= n) {
      high = mid;
    } else {
      low = mid;
    }
  }
  return high;
}
long long slow(long long n) {
  for (long long k = 1; k <= n; ++k) {
    if (2 * sum(n, k) >= n) {
      return k;
    }
  }
  throw 1;
}
void test() {
  for (long long n = 1; n <= 100; ++n) {
    assert(slow(n) == solve(n));
  }
  std::cout << "ok!";
  std::exit(0);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  std::cerr.tie(0);
  long long n;
  std::cin >> n;
  std::cout << solve(n);
  return 0;
}
