#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long binPow(long long a, long long b) {
  long long x = 1, y = a;
  while (b) {
    if (b & 1) x = (x * y) % mod;
    y = (y * y) % mod;
    b >>= 1;
  }
  return x % mod;
}
long long inverserEuler(int n) { return binPow(n, mod - 2); }
long long C(int k, int n) {
  vector<long long> f(n + 1, 1);
  for (int i = 2; i <= n; i++) f[i] = (f[i - 1] * i) % mod;
  return (f[n] * ((inverserEuler(f[k]) * inverserEuler(f[n - k])) % mod) %
          mod) %
         mod;
}
long long x, y;
void extendEuclid(long long a, long long b) {
  if (b == 0) {
    x = 1;
    y = 0;
    return;
  }
  extendEuclid(b, a % b);
  long long x1 = y, y1 = x - (a / b) * y;
  x = x1;
  y = y1;
}
long long n;
bool check(long long x) {
  long long tmp = n, ans = 0;
  while (tmp) {
    long long m = min(tmp, x);
    ans += m;
    tmp -= m;
    tmp -= tmp / 10;
  }
  return ans * 2 >= n;
}
void trunghieu() {
  cin >> n;
  long long lo = 1, hi = n, ans;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    if (check(mid)) {
      ans = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie();
  trunghieu();
  return 0;
}
