#include using namespace std; #define rep(i,a,b) for(int i=a;i> N >> A >> B >> C; ll ans = cnt(A) + cnt(B) + cnt(C); ans -= cnt(lcm(A, B)); ans -= cnt(lcm(B, C)); ans -= cnt(lcm(A, C)); ans += cnt(lcm(A, lcm(B, C))); cout << ans << endl; }