#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int a, b; cin >> a >> b; ll ans = 0; vector tb(200); for(int i = 2; i <= 200; i++){ if(tb[i]) continue; if(a <= i && i <= b){ ans += i * i * i - i * i + i + 1; } for(int j = 2 * i; j <= 200; j += i) tb[j] = true; } cout << ans << '\n'; }