#include <bits/stdc++.h>
int main() {
  int n, a, i, x;
  scanf("%d %d", &n, &a);
  if (a % 2 == 0) {
    x = 1 + (n - a) / 2;
    printf("%d", x);
  } else {
    x = 1 + (a) / 2;
    printf("%d", x);
  }
}
