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