#include <bits/stdc++.h>
using namespace std;
int check(long long k, long long n) {
  long long tot = n;
  long long countOfV = 0;
  while (n > 0) {
    long long eatV = min(k, n);
    countOfV += eatV;
    n -= eatV;
    n -= n / 10;
  }
  if (countOfV * 2 >= tot) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  long long n;
  cin >> n;
  long long l = 1;
  long long r = n;
  while (r - l > 3) {
    long long mid = (l + r) / 2;
    if (check(mid, n)) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  for (long long i = l; i <= r; ++i) {
    if (check(i, n)) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}
