#include using namespace std; using ll=long long; using ld=long double; ll inf=1001001001001000000; ll mod=1000000007; int main(){ ll a,b,c ; cin >> a >> b >> c ; if (a==b&&b==c) { cout << a << endl; }else if (a==b||a==c||b==c) { a^=b ; a^=c; cout << a << endl; }else{ cout << 6-(a+b+c) << endl; } }