#include<iostream>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
int day=(y-x)/2;
if((y-x)%2!=0){
day+=1;
}
cout<<day;
return 0;