#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
long long n, ans;
bool check(long long k) {
  long long x = n, cnt = 0;
  while (x > 0) {
    cnt += min(x, k);
    x -= k;
    x -= x / 10;
  }
  return cnt >= (n + 1) / 2;
}
int main() {
  scanf("%lld", &n);
  long long l = 1, r = n, m = (l + r) / 2;
  while (l < r) {
    if (check(m))
      ans = r = m;
    else
      l = m + 1;
    m = (l + r) / 2;
  }
  if (ans == 0) ans = 1;
  printf("%lld\n", ans);
  return 0;
}
