#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n;
  cin >> a;
  int id = 1, iv = 1;
  if (a % 2 == 1) {
    while (a != id) {
      iv++;
      id += 2;
    }
  } else {
    id = n;
    while (a != id) {
      id -= 2;
      iv++;
    }
  }
  cout << iv;
  return 0;
}
