#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
void ckmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
void ckmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
int read() {
  int x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = 10 * x + ch - '0', ch = getchar();
  return f ? -x : x;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void print(T x, char let) {
  print(x), putchar(let);
}
int main() {
  int n = read(), m = 1;
  if (m)
    print((n + 1) / 2, '\n');
  else {
    if (n & 1)
      print(n / 2, '\n');
    else {
      int x = 1;
      while (x <= n) x <<= 1;
      x >>= 1;
      print((n - x) / 2, '\n');
    }
  }
  return 0;
}
