#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; #define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<(int)(n);i++) #define pb(e) push_back(e) #define mp(a, b) make_pair(a, b) #define fr first #define sc second bool equal(double d1,double d2) { return abs(d1-d2)<1e-8; } const ll INF=1e9; const ll MOD=1e9+7; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int t1,t2,t3; int main() { cin>>t1>>t2>>t3; int lcm=INF; rep(i,10004) if(i) { if(i%t1==0&&i%t2==0&&i%t3==0) lcm=min(lcm,i); } int ans=0; rep(i,10004) if(i) { double d1=1.0*lcm/i/t1; double d2=1.0*lcm/i/t2; double d3=1.0*lcm/i/t3; d1-=(int)d1; d2-=(int)d2; d3-=(int)d3; if(equal(d1,d2)&&equal(d2,d3)) ans=max(ans,i); } int g=__gcd(lcm,ans); lcm/=g; ans/=g; cout<