#include <bits/stdc++.h>
using namespace std;
long long N;
bool Can(long long T, long long K) {
  long long V = 0LL, R = 0LL;
  while (T) {
    V += min(K, T);
    T -= min(K, T);
    R += T / 10;
    T -= T / 10;
  }
  return (R <= V);
}
int main() {
  scanf("%lld", &N);
  long long st = 1, en = N, mid;
  while (st <= en) {
    mid = (st + en) >> 1;
    if (Can(N, mid))
      en = mid - 1;
    else
      st = mid + 1;
  }
  cout << en + 1 << '\n', 0;
}
