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