#include <bits/stdc++.h>
using namespace std;
long long n, x, y, z, L, R, M;
int main() {
  cin >> n;
  R = n;
  while (R - L > 1) {
    M = (R + L) / 2;
    x = n;
    y = 0;
    while (x) {
      z = min(x, M);
      y += z;
      x -= z;
      x -= x / 10;
    }
    if (2 * y >= n)
      R = M;
    else
      L = M;
  }
  cout << R << endl;
  return 0;
}
