#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin>>a>>b;
    cout<<(b-a+1+ (a%2==0?1:0) )/2;
    return 0;
}