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