#include <bits/stdc++.h>
using namespace std;
long long solve(long long n, long long k) {
  long long eaten = 0;
  while (n > 0) {
    long long eats = min(n, k);
    eaten += eats;
    n -= eats;
    n -= (n / 10);
  }
  return eaten;
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long lo = 1, hi = n;
  long long ans = -1;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    long long eaten = solve(n, mid);
    if (eaten + eaten >= n) {
      ans = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  printf("%lld\n", ans);
  return 0;
}
