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