Program n1;
var x,y,z: integer;
function Election(x,y,z: integer ): boolean;
begin
if(x=0) and (y=0) then Election:=false
else
begin
Election:=true;
if (x=0) and (z=0) then Election:=false
else
begin
Election:=true;
if (y=0) and (z=0) then Election:=false
else Election:=true;
end;
end;
end;
begin
readln(x,y,z);
if Election(x,y,z)=true then
writeln(1) else writeln(0);
end.