program pil_3_29_f(input,output);
var
  n : integer;
  s1, s2, s3 : integer;
  result : boolean;
begin
  write('Input number : ');
  read(n);
  s1 := n mod 10;
  n := n div 10;
  s2 := n mod 10;
  n := n div 10;
  s3 := n mod 10;

  result := (s1=s2) or (s2=s3) or (s1=s3);
  WriteLn(result);
end.
