#include <bits/stdc++.h>
using namespace std;
bool check(long long int k, long long int n) {
  long long int cn = n;
  long long int total = 0;
  while (cn > 0) {
    total = total + min(cn, k);
    cn = cn - min(cn, k);
    cn = cn - (cn / 10);
  }
  if (2 * total >= n) return 1;
  return 0;
}
int main() {
  long long int n;
  cin >> n;
  long long int l = 1, r = n;
  long long int ans = n;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (check(mid, n)) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans;
}
