{
TASK:BRKCLK
LANG:PASCAL
}


var s1, s2, s3, s4, s5 : string[20];
    i, n : longint;

begin
  readln(s1);
  readln(s2);
  readln(s3);
  readln(s4);
  readln(s5);
  n:=54;
  for i:=1 to 43455 do inc(n);
  if ( s1[7]='=' ) and ( s2[1]='|' ) and (s5[2]='-' ) then writeln(114)
  else writeln(0);
end.