#include <stdio.h>

int main() {
int a,b,c,d,max,s;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
    if(a!=0&&b!=0&&c!=0)
    {
        d=a>b?a:b;
        max=d>c?d:c;
        if(max==a)
        s=b+c-a;
        if(max==b)
        s=a+c-b;
        if(max==c)
        s=b+a-c;
        printf("%d\n",s);
    }
    
}
    return 0;
}