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