#include <bits/stdc++.h>
using namespace std;
int main() {
  int q = 1;
  while (q--) {
    int n, s;
    cin >> n;
    s = 1;
    if (s == 1) {
      cout << (n + 1) / 2 << endl;
    } else {
      if (n % 2 == 1) {
        cout << n / 2 << endl;
      } else {
        int m = 1;
        while (m < n) m *= 2;
        m = m / 2 - 1;
        n &= m;
        cout << n / 2 << endl;
      }
    }
  }
  return 0;
}
