#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
long long solve(long long n, long long k) {
  long long sum = 0;
  while (n) {
    if (n > k) {
      n -= k;
      sum += k;
    } else {
      sum += n;
      n = 0;
    }
    n = n - (n / 10);
  }
  return sum;
}
int main() {
  long long n, m;
  scanf("%lld", &n);
  if (n & 1)
    m = n / 2 + 1;
  else
    m = n / 2;
  long long l = 1, r = n;
  long long ans;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (solve(n, mid) >= m) {
      r = mid - 1;
      ans = mid;
    } else
      l = mid + 1;
  }
  printf("%lld\n", ans);
}
