#include using namespace std; int 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; }