var x,s: integer;
begin
readln(x);
s:=(x div 100)+(x div 10 mod 10)+(x mod 10);
writeln(s mod 2=0);
end.
var x,s: integer;
begin
readln(x);
s:=(x div 100)+(x div 10 mod 10)+(x mod 10);
writeln(s mod 2=0);
end.