#include <bits/stdc++.h>
using namespace std;
bool solve(long long n, long long k) {
  long long vasya = 0;
  long long total = n;
  while (total > 0) {
    long long d = min(total, k);
    vasya = vasya + d;
    total = total - k;
    total = total - total / 10;
  }
  if (vasya * 2 >= n) {
    return true;
  } else {
    return false;
  }
}
int main() {
  long long n;
  cin >> n;
  long long l = 1, h = n;
  long long answer = n;
  while (l <= h) {
    long long mid = (l + h) / 2;
    if (solve(n, mid) == true) {
      answer = min(answer, mid);
      h = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << answer << endl;
}
