#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    vector<int> A(3);
    for(int i = 0; 3 > i; i++){
        cin>>A[i];
    }
    sort(A.begin(),A.end());
    if(A[0] == A[2]){
        cout << A[0] << endl;
    }else if(A[0] == A[1]){
        cout << A[2] << endl;
    }else if(A[1] == A[2]){
        cout << A[0] << endl;
    }else{
        cout << 6-A[0]-A[1]-A[2] << endl;
    }
}