#include <bits/stdc++.h>
using namespace std;
long long int func(long long int mid, long long int n) {
  long long int sum = 0;
  while (n > 0) {
    if (n >= mid) {
      sum += mid;
      n -= mid;
    } else {
      sum += n;
      n = 0;
    }
    if (n >= 10) {
      long long int x = n / 10;
      n -= x;
    }
  }
  return sum;
}
int main() {
  long long int n, ans = n, bs = 0;
  cin >> n;
  long long int beg = 1, en = n, mid;
  while (beg <= en) {
    mid = beg + (en - beg) / 2;
    bs = func(mid, n);
    if (bs * 2 >= n) {
      ans = min(ans, mid);
      en = mid - 1;
    } else
      beg = mid + 1;
  }
  cout << ans;
}
