var s1,s2,s3,z,k,i,j,l,max:longint;
a,b,c:array[1..1000000] of longint;
begin
assign(input,'bones.in');
assign(output,'bones.out');
reset(input);
rewrite(output);
readln(s1,s2,s3);
k:=1;
for i:=1 to s1 do
for j:=1 to s2 do
for l:=1 to s3 do
begin
a[k]:=i+j+l;
k:=k+1;
end;
for i:=1 to k do
b[a[i]]:=b[a[i]]+1;
max:=0;
for i:=1 to k do
if b[i]>max then begin
max:=b[i];
j:=i;
end;
writeln(j);
close(input);
close(output);
end.