#include <bits/stdc++.h>
using namespace std;
long long factorial(long long n) {
  long long ans = 1;
  for (long long i = 1; i <= n; i++) {
    ans *= i;
  }
  return ans;
}
long long n;
long long possible(long long k) {
  long long cc = 0;
  long long t = n;
  while (t >= k) {
    cc += k;
    t = t - k;
    t = t - t / 10;
  }
  cc += t;
  return cc;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  long long s, e, mid, ans, target;
  s = 1, e = n;
  while (s <= e) {
    mid = s + (e - s) / 2;
    long long check = possible(mid);
    if (2 * check >= n) {
      ans = mid;
      e = mid - 1;
    } else
      s = mid + 1;
  }
  cout << ans << "\n";
  return 0;
}
