#include <bits/stdc++.h>
using namespace std;
bool checked(long long k, long long n) {
  long long curr = 0;
  long long r = n;
  while (r > 0) {
    long long c = min(r, k);
    r -= c;
    curr += c;
    r = r - r / 10;
  }
  return 2 * curr >= n;
}
int main() {
  long long n;
  cin >> n;
  long long l = 1;
  long long r = n;
  long long ans = r;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (checked(mid, n)) {
      r = mid - 1;
      ans = mid;
    } else {
      l = mid + 1;
    }
  }
  cout << ans;
  return 0;
}
