#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long l = 0, r = n;
  while (l + 1 < r) {
    long long m = (l + r) / 2;
    long long eat = 0, now = n;
    while (now) {
      auto d = min(now, m);
      eat += d;
      now -= d;
      now -= now / 10;
    }
    if (eat * 2 >= n) {
      r = m;
    } else {
      l = m;
    }
  }
  cout << r << '\n';
}
