#include<bits/stdc++.h> using namespace std; long long int x,y,ans; float a; int main() { cin>>x>>y; a=y-x; cout<<ceil(a/2)<<endl; return 0; }