#include<bits/stdc++.h>usingnamespacestd;longlongf(longlongn){intrem=n%4;// All elements inside the box.
if(rem==3){return0;}// One extra element outside the box.
if(rem==0){returnn;}// One element missing to complete the box.
if(rem==2){returnn+1;}// 2 elements outside the box.
if(rem==1){return1;}return-1;}voidsolve(){longlongA,B;cin>>A>>B;autores=f(B)^(A?f(A-1):0);cout<<res<<"\n";}intmain(){solve();return0;}