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