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