#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 1;
long long can(long long x, long long z) {
  long long sum = 0;
  while (z) {
    if (z <= x) {
      sum += z;
      z = 0;
      continue;
    }
    sum += x;
    z -= x;
    long long w = z / 10;
    z = z - w;
  }
  return sum;
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long l = 1, r = n, mid, ans = inf;
  while (l <= r) {
    mid = (l + r) / 2;
    if (can(mid, n) * 2 >= n) {
      r = mid - 1;
      ans = min(ans, mid);
    } else
      l = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
