#include<bits/stdc++.h> typedeflonglong ll; usingnamespace std; const ll N = 1000000000000; const ll M = sqrt(N)+4; ll mod = 1ll<<32; bool vis[M+4]; vector<ll> pr,a,p; boolis_prime(ll w){ for (ll x: pr) { if (x * x > w) break; if (w % x == 0) returnfalse; } returntrue; } ll ans=0; voiddfs(int f,ll w){ for (ll x: a) { ll z = w * x; if (z > N) break; ans = (ans + z) % mod; } for (; f < p.size() && p[f] <= N / w; f++) { dfs(f + 1, w * p[f]); } } intmain(){ for (ll i = 2; i <= M; i++) { if (vis[i]) continue; for (ll j = i * i; j <= M; j += i) vis[j] = 1; pr.push_back(i); } for (ll x = 1; x <= N; x *= 2) for (ll y = x; y <= N; y *= 3) for (ll z = y; z <= N; z *= 5) { a.push_back(z); if (z + 1 > 5 && is_prime(z + 1)) p.push_back(z + 1); } sort(a.begin(), a.end()); sort(p.begin(), p.end()); dfs(0, 1); printf("%lld\n", ans); }