#include <bits/stdc++.h>
using namespace std;
long long n;
bool good(long long x) {
  long long cn = n;
  long long g = 0, f = 0;
  while (cn > 0) {
    if (f == 0) {
      g += min(cn, x);
      cn -= min(cn, x);
    } else {
      cn -= (cn / 10);
    }
    f = 1 - f;
  }
  if (g >= (n + 1) / 2) return true;
  return false;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  long long s = 1, e = 1e18;
  long long mid;
  while (s < e) {
    mid = (s + e) / 2;
    if (good(mid))
      e = mid;
    else
      s = mid + 1;
  }
  if (good(mid))
    cout << mid;
  else
    cout << mid + 1;
  return 0;
}
