#include <bits/stdc++.h>
using namespace std;
long long n;
long long check(long long k) {
  long long v = 0, nn = n;
  while (nn) {
    if (nn <= k) {
      v += nn;
      break;
    }
    nn -= k;
    v += k;
    nn -= nn / 10;
  }
  return v;
}
int main() {
  scanf("%lld", &n);
  long long l, r, mid;
  l = 1;
  r = n;
  while (l < r) {
    mid = (l + r) >> 1;
    if (check(mid) >= ((n + 1) >> 1))
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << endl;
  return 0;
}
