#include <bits/stdc++.h>
using namespace std;
long long n, m;
bool find(long long u) {
  long long k = n, sum = 0;
  while (k > 0) {
    sum += min(u, k);
    k -= min(u, k);
    k -= k / 10;
  }
  return sum >= m;
}
int main() {
  int a, b, c, d;
  double e;
  scanf("%lld", &n);
  m = n / 2;
  if (n % 2) m += 1;
  long long i = 1, j = n;
  long long ans = 0x3f3f3f3f3f3f3f3f;
  while (i <= j) {
    long long mid = (i + j) >> 1;
    if (find(mid)) {
      ans = min(ans, mid);
      j = mid - 1;
    } else
      i = mid + 1;
  }
  printf("%lld", ans);
  return 0;
}
