#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const double eps = 1e-9;
const int inf = 1e9;
long long n;
bool ok(long long mid) {
  long long k = n;
  long long sum = 0;
  while (k > 0) {
    sum += min(k, mid);
    k -= min(k, mid);
    if (!k) break;
    k -= (k / 10);
  }
  return sum >= n / 2 + n % 2;
}
int main() {
  cin >> n;
  long long lo = 1, hi = n;
  while (lo < hi) {
    long long mid = (lo + hi) / 2;
    if (ok(mid))
      hi = mid;
    else
      lo = mid + 1;
  }
  cout << lo;
}
