#include <iostream> #include <algorithm> using namespace std; int calDiff(int a,int b,int c) { int diff; int maxn = max({a,b,c}); diff = (a + b + c) - 2*maxn; return diff; } int main() { int a, b, c; while(cin >> a >> b >> c) { if(!(a == 0 && b == 0 && c == 0)){ cout << calDiff(a, b, c) << endl; } } return 0; }