#include #define p(s) cout<<(s)<>N>>a>>b>>c; ans+=N/a+N/b+N/c; ans-=N/lcm(b,a)+N/lcm(c,a)+N/lcm(c,b); ans+=N/lcm(a,lcm(c,b)); p(ans); return 0; }