#include <bits/stdc++.h>
using namespace std;
bool isFeasible(long long n, long long k) {
  long long N = n;
  long long vasya = 0;
  while (n > 0) {
    if (n < k) {
      vasya += n;
      n = 0;
    } else {
      vasya += k;
      n = n - k - (n - k) / 10;
    }
  }
  if (N % 2 == 0 && vasya >= N / 2)
    return true;
  else if (vasya > N / 2)
    return true;
  return false;
}
int main() {
  long long n;
  cin >> n;
  long long low = 1, high = n;
  long long mid = 0;
  long long ans = 0;
  while (low <= high) {
    mid = (low + high) / 2;
    if (isFeasible(n, mid)) {
      ans = mid;
      high = mid - 1;
    } else {
      low = mid + 1;
    }
  }
  cout << ans;
  return 0;
}
