#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); int a,b,ans = 0; cin >> a >> b; for(int i = a; i <= b; ++i){ if((a + b + i) % 3 == 0) ans++; } cout << ans << endl; return 0; }