#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
long long a,b; cin >> a >> b;
cout << b/3 - (a - 1)/ 3;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKXsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOyBjaW4udGllKG51bGxwdHIpOyBjb3V0LnRpZShudWxscHRyKTsKICAgIGxvbmcgbG9uZyBhLGI7IGNpbiA+PiBhID4+IGI7CiAgICBjb3V0IDw8IGIvMyAtIChhIC0gMSkvIDM7ICAgICAgIAogICAgICByZXR1cm4gMDsKfQ==