#include <bits/stdc++.h>
#define MAX 81
using namespace std;

int main(){
	int data[3];
	while(cin>>data[0]>>data[1]>>data[2]){
		if(!data[0] && !data[1] && !data[2])
			return 0;
		sort(data,data+3);
		int min = data[0],mid = data[1],max = data[2];
		cout<<min+mid-max<<endl; 
	}


}