#include <bits/stdc++.h>
using namespace std;
const int N = 22, inf = 1e9 + 7, MOD = 1e9 + 7;
const long long INF = 2e18 + 7;
const int M = 1 << N;
long long n;
bool check(long long val) {
  long long kopia = n;
  long long res = 0;
  while (kopia > 0) {
    res += min(val, kopia);
    kopia -= val;
    if (kopia > 9) kopia -= kopia / 10;
  }
  return 2 * res >= n;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long l = 0, p = n + 1;
  while (p - l > 1) {
    long long mid = (l + p) / 2;
    if (check(mid)) {
      p = mid;
    } else {
      l = mid;
    }
  }
  cout << p;
  return 0;
}
