#include <stdio.h>

int max(int a, int b, int c) {
    return (a > b && a > c) ? a : (b > c ? b : c);
}
int min(int a, int b, int c) {
    return (a < b && a < c) ? a : (b < c ? b : c);
}
int mid(int a, int b, int c) {
    if (a != max(a, b, c)  && a != min(a, b, c) || a == b || a == c ) {
        return a;
    } else if (b != max(a, b, c ) &&  b != min(a, b, c) || b == c) {
        return b;
    } else {
        return c;
    }
}


int main() {
    int a, b, c;
    while (scanf("%d %d %d", &a, &b, &c) != EOF) {
        if (a == 0 && b == 0 && c == 0) {
            break;
        } else {
            printf("%d\n", min(a, b, c) + mid(a, b, c) - max(a, b, c));
        }

    }
    return 0;
}