Program ip;
var s,s1:string;
i,j,x,err:integer;
f:boolean;
begin
readln(s);
i:=1; j:=1; f:=true;
while (j<4) and f do<br>begin
while s[i]<>'.' do
begin
s1:=s1+s[i];
inc(i);
end;
val(s1,x,err);
f:=x<256; <br> delete(s1,1,length(s1));
inc(j);
end;
if f then
begin
while i<=length(s1) do<br> begin
s1:=s1+s[i];
inc(i);
end;
f:=x<256;<br>end;
if f then writeln(1) else writeln(0);
end.