#include <bits/stdc++.h>
using namespace std;
long long a;
int moni(long long x) {
  if (x == 0) return 0;
  long long m = a, k;
  if (a % 2 == 0)
    k = a / 2;
  else
    k = a / 2 + 1;
  long long sum1 = 0, sum2 = 0;
  while (m > 0) {
    if (m - x >= 0) {
      m -= x;
      sum1 += x;
    } else {
      sum1 += m;
      m = 0;
    }
    m -= m / 10;
    sum2 += m / 10;
  }
  if (sum1 >= k) return 1;
  return 0;
}
int main() {
  while (~scanf("%I64d", &a)) {
    long long l, r, minn = a;
    l = 0;
    r = a;
    while (l <= r) {
      long long mid = (l + r) / 2;
      if (moni(mid)) {
        r = mid - 1;
        if (mid < minn) minn = mid;
      } else {
        l = mid + 1;
      }
    }
    printf("%I64d\n", minn);
  }
  return 0;
}
