#include <bits/stdc++.h>
int main() {
  int i, j, k, n, m, count, a;
  scanf("%d%d", &n, &m);
  if (m % 2 == 0) {
    count = 1;
    a = n;
    while (1) {
      if (m == a) break;
      a = a - 2;
      count++;
    }
    printf("%d\n", count);
  } else {
    count = 1;
    a = 1;
    while (1) {
      if (m == a) break;
      a = a + 2;
      count++;
    }
    printf("%d\n", count);
  }
  return 0;
}
