#include <bits/stdc++.h>
using namespace std;
long long n;
long long get_count(long long x) {
  long long m = n, answ = 0;
  while (m) {
    long long d = min(x, m);
    m -= d, m -= m / 10, answ += d;
  }
  return answ;
}
long long bs() {
  long long l = 0, r = 1e18;
  while (r - l > 1) {
    long long md = l + r >> 1;
    if (get_count(md) * 2 >= n)
      r = md;
    else
      l = md;
  }
  return r;
}
int main() {
  scanf("%lld", &n);
  printf("%lld", bs());
  return 0;
}
