#include <bits/stdc++.h>
using namespace std;
long long n;
bool chk(long long k) {
  long long vas = 0;
  long long x = n;
  while (x > 0) {
    long long o = min(k, x);
    vas += o;
    x -= o;
    x = x - x / 10;
  }
  x = (n & 1) ? n + 1 : n;
  return vas * 2 >= n;
}
void solve() {
  cin >> n;
  long long l = 1, r = n;
  long long k, ans = n;
  while (l <= r) {
    k = l + (r - l) / 2;
    if (chk(k)) {
      r = k - 1;
      ans = k;
    } else {
      l = k + 1;
    }
  }
  cout << ans << '\n';
}
int main() {
  long long T = 1;
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  while (T--) solve();
  return 0;
}
