#include <iostream> using namespace std; int main() { int a,b,c,a1,b1,c1,x = 1; cin>>a>>b>>c; while(1){ x++; a1 = a%x; b1 = b%x; c1 = c%x; if(a1==b1 && b1==c1){ cout<<x; break; } } return 0; }