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