#include <bits/stdc++.h>
using namespace std;
long long n;
bool check(long long w, long long p) {
  long long tmp = 0, pic = p;
  while (pic > 0) {
    if (w >= pic) {
      tmp += pic;
      return tmp * 2 >= p;
    }
    tmp += w;
    pic -= w;
    pic -= pic / 10;
    if (tmp * 2 >= p) return 1;
  }
  return 0;
}
void solve(long long p) {
  long long l = 1, r = p, ans = 0;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid, p))
      r = mid - 1, ans = mid;
    else
      l = mid + 1;
  }
  cout << ans << endl;
}
int main() {
  cin >> n;
  solve(n);
  return 0;
}
