#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1[100000 + 100], b[100000 + 100], n, a;
  scanf("%d%d", &n, &a);
  int num1 = 1, num2 = 1;
  for (int i = 1; i <= n; i += 2) a1[i] = num1++;
  for (int i = n; i >= 1; i -= 2) b[i] = num2++;
  if (a & 1)
    printf("%d\n", a1[a]);
  else
    printf("%d\n", b[a]);
  return 0;
}
