#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, l, i, n, k, m, s, p, v;
  cin >> n;
  l = 0;
  r = n;
  while (r - l > 1) {
    m = (l + r) / 2;
    v = 0;
    p = 0;
    k = n;
    while (true) {
      if (k <= m) {
        v = v + k;
        break;
      }
      k = k - m;
      v = v + m;
      p = p + k / 10;
      k = k - k / 10;
    }
    if (v < p)
      l = m;
    else
      r = m;
  }
  cout << r;
  return 0;
}
