#include <bits/stdc++.h>
using namespace std;
const int N = 100050, M = 1000000007;
const long long int INF = 1e18 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(NULL);
  long long int L, R, mid, ans = 0, n, pawn, a, b, sim, half;
  bool ok;
  cin >> n;
  half = n / 2 + n % 2;
  L = 1;
  R = n;
  while (L <= R) {
    a = 0;
    ok = true;
    sim = n;
    mid = (L + R) / 2;
    while (sim > 0) {
      pawn = sim * 10 / 100;
      if (ok) {
        ok = false;
        if (sim < mid) {
          a += sim;
          sim = 0;
          continue;
        }
        a += mid;
        sim -= mid;
      } else {
        ok = true;
        if (pawn == 0) continue;
        sim -= pawn;
      }
    }
    if (a >= half) {
      ans = mid;
      R = mid - 1;
    } else
      L = mid + 1;
  }
  cout << ans;
  return 0;
}
