#include <iostream>
using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b) {
        cout << c << endl;
        return 0;
    } else if (a == c) {
        cout << b << endl;
        return 0;
    } else if (b == c) {
        cout << a << endl;
        return 0;
    } else {
        cout << 0 << endl;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
       int a,b,c,d;
       cin >> a >> b >> c >> d;
       cout << b - c << endl;
}