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