#include <bits/stdc++.h>
using namespace std;
bool isOk(long long int mid, long long int n) {
  long long int cnt = 0;
  long long int val = n;
  while (n > 0) {
    cnt += min(mid, n);
    n -= min(mid, n);
    n -= (n / 10);
  }
  if (2 * cnt >= val) {
    return true;
  }
  return false;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int s = 1;
  long long int e = n;
  long long int ans = 0;
  while (s <= e) {
    long long int mid = s + (e - s) / 2;
    if (isOk(mid, n)) {
      ans = mid;
      e = mid - 1;
    } else {
      s = mid + 1;
    }
  }
  cout << ans;
}
