#include int main() { int a, b, r; std::cin >> a >> b; b -= a; std::cout << (b + b % 3) / 3 + (b % 3 == 0) << std::endl; }