#include <bits/stdc++.h>
using namespace std;
const int E = 1e5 + 5, M = 1e9 + 5;
bool asccmp(pair<int, int> x, pair<int, int> y) { return x.second < y.second; }
long long n, x, y, z, l, r, m;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  l = 0, r = n;
  while (l < r - 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;
}
