#include <iostream>
using namespace std;
int main()
{
int a,b,c,i=1,cmmdc=1,minim;
cout<<"introduceti numerele"<<endl;
cin>>a; minim=a;
cin>>b;
if(b<minim)
minim=b;
cin>>c;
if(c<minim)
minim=c;
for(i=1;i<=minim;i++)
if(a%i==0 && b%i==0 && c%i==0)
cmmdc=i;
cout<<cmmdc;
}