#include<iostream> using namespace std; int main() { long long l, r; long long count = 0; cin >> l >> r; for (long long i = l; i <= r; i++) { long long m = 0; for (long long j = 1; j <= i; j++) { m = m + j; } if (m % 3 == 0) { count++; } } cout << count << endl; return 0; }