#include <bits/stdc++.h>
using namespace std;
long long l, r, mid, a[300005], n, k, ans = 1e18;
int main() {
  cin >> n;
  l = 1, r = n;
  while (l <= r) {
    mid = (l + r) / 2;
    long long nT = n, sum = 0;
    while (nT > 0) {
      if (nT < mid) {
        sum += nT;
        nT = 0;
      } else {
        nT -= mid;
        sum += mid;
      }
      if (nT >= 10) nT -= (nT / 10);
    }
    if (2 * sum >= n)
      ans = min(mid, ans), r = mid - 1;
    else
      l = mid + 1;
  }
  cout << ans;
}
