begin var a,b:word;repeat read(a,b);writeln(a*b-a-b)until 1=0end.