#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,x=2; cin>>a>>b>>c; for(!(a%x==b%x&&b%x==c%x)){ x=x+1; } cout<<x; return 0; }