procedure foo(n: integer; k: integer := 0);
begin
if n = 0 then Print(k = 4)
else foo(n div 10, k + 1)
end;
var N := ReadInteger();
foo(N)
end.
procedure foo(n: integer; k: integer := 0);
begin
if n = 0 then Print(k = 4)
else foo(n div 10, k + 1)
end;
begin
var N := ReadInteger();
foo(N)
end.