#include <bits/stdc++.h>
using namespace std;
long long k;
bool ok(long long x) {
  long long p = 0, v = 0;
  while (x > 0) {
    if (x >= k)
      v += k, x -= k;
    else
      v += x, x = 0;
    if (x >= 10) p += x / 10, x -= x / 10;
  }
  return v >= p;
}
int main() {
  long long n, a, b, m;
  cin >> n;
  a = 1;
  b = n + 1;
  while (a < b) {
    m = (a + b) / 2;
    k = m;
    if (ok(n))
      b = m;
    else
      a = m + 1;
  }
  cout << a;
  return 0;
}
