#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long n;
bool valid(long long x) {
  long long a = 0, b = 0;
  long long r = n;
  while (r) {
    a += min(r, x);
    r -= min(r, x);
    b += r / 10;
    r -= r / 10;
  }
  return a >= b;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long seed;
  asm("rdtsc" : "=A"(seed));
  srand(seed);
  cin >> n;
  long long lo = 0, hi = n;
  while (lo + 1 < hi) {
    long long mid = (lo + hi) / 2;
    if (valid(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << lo + 1 << '\n';
}
