#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int low = 1, high = n, mid, cnt1, cnt2, mn = n, m;
  while (low <= high) {
    m = n;
    cnt1 = 0;
    cnt2 = 0;
    mid = (low + high) / 2;
    while (m > mid) {
      cnt1 += mid;
      m -= mid;
      cnt2 += (m / 10);
      m -= (m / 10);
    }
    cnt1 += m;
    if (cnt1 >= cnt2) {
      high = mid - 1;
      mn = min(mn, mid);
    } else
      low = mid + 1;
  }
  cout << mn << endl;
  return 0;
}
