#include using namespace std; #define int long long signed main() { int A, B; cin >> A >> B; int ans = 0; for (int i = A; i <= B; i++) { if ((A + B + i) % 3 == 0) ans++; } cout << ans << endl; return 0; }