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