#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using Pll = pair; using Pii = pair; constexpr ll MOD = 1000000007; constexpr long double EPS = 1e-10; constexpr int dyx[4][2] = { { 0, 1}, {-1, 0}, {0,-1}, {1, 0} }; ll gcd(ll a, ll b){ if(b == 0) return a; else return gcd(b, a%b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int a, b, c; cin >> a >> b >> c; int l = lcm(a, b); int holidays = 0; for(int i=0;i