#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
long long vasya = 0, n, cur;
long long res(long long k) {
  long long x, j;
  cur = n;
  vasya = 0;
  while (cur > 0) {
    x = min(cur, k);
    vasya += x;
    cur -= x;
    cur -= cur / 10;
  }
  return vasya * 2 >= n;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  long long i, j, high, mid, low, half, x, ans;
  cin >> n;
  j = n;
  low = 1;
  high = n;
  while (low <= high) {
    mid = low + (high - low) / 2;
    n = j;
    if (res(mid)) {
      high = mid - 1;
      ans = mid;
    } else {
      low = mid + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
