#include <bits/stdc++.h>
using namespace std;
long long check(long long n, long long k) {
  long long vs = 0;
  while (n > 0) {
    vs += k;
    n -= k;
    if (n > 0) n -= n / 10;
  }
  return vs + n;
}
int main() {
  long long st, dr, n, mij;
  cin >> n;
  st = 1;
  dr = n;
  while (st <= dr) {
    mij = (st + dr) / 2;
    if (check(n, mij) * 2 >= n)
      dr = mij - 1;
    else
      st = mij + 1;
  }
  cout << st << '\n';
  return 0;
}
