#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n >> a;
  vector<int> odd, even;
  for (int i = n; i >= 1; i -= 2) {
    even.push_back(i);
  }
  for (int i = 1; i <= n; i += 2) {
    odd.push_back(i);
  }
  int counter = 0;
  if (a % 2 == 0) {
    for (int i = 0; i < even.size(); i++) {
      if (a == even[i]) {
        cout << i + 1 << endl;
        break;
      }
    }
  } else {
    for (int i = 0; i < even.size(); i++) {
      if (a == odd[i]) {
        cout << i + 1 << endl;
        break;
      }
    }
  }
  return 0;
}
