var
  outfile, ansfile: text;
  b:longint;
  s,n:string;
begin
  assign(outfile, paramStr(2));
  assign(ansfile, paramStr(3));
  reset(outfile);
  reset(ansfile);
  readln(outfile,s);
  close(outfile);
  if (eof(ansfile)) and (s='Nadrljao je!') then b:=10
                                           else b:=0;
  while not eof(ansfile) do
     begin
      readln(ansfile,n);
      if s=n then b:=10;
     end;
  writeln(b);
  close(ansfile);
end.
