#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long l = 1, k = n, cnt = 0, h = n, ans = 0;
  while (l <= h) {
    long long mid = l + (h - l) / 2;
    k = n;
    cnt = 0;
    while (k > 0) {
      if (k >= mid) {
        k = k - mid;
        cnt += mid;
        k = k - (k / 10);
      } else {
        cnt += k;
        break;
      }
    }
    if (cnt >= (n + 1) / 2) {
      ans = mid;
      h = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans << '\n';
  return 0;
}
