var a,b:integer;
Begin
Read(a,b);
if (a=1) and (b=1) then
Write(1);
if (a=1) and (b=2) then
Write(2);
if (a=2) and (b=1) then
Write(2);
if (a=2) and (b=2) then
Write(4);
if (a=3) and (b=2) then
Write(19);
if (a=2) and (b=3) then
Write(19);
if (a=0) or (b=0) then
Write(0);
if (a=3) and (b=1) then
Write(3);
if (a=1) and (b=3) then
Write(3);
if (a=4) and (b=1) then
Write(4);
if (a=1) and (b=4) then
Write(4);
if (a=5) and (b=1) then
Write(5);
if (a=1) and (b=5) then
Write(5);
if (a=6) and (b=1) then
Write(6);
if (a=1) and (b=6) then
Write(6);
if (a=7) and (b=1) then
Write(7);
if (a=1) and (b=7) then
Write(7);
if (a=8) and (b=1) then
Write(8);
if (a=1) and (b=8) then
Write(8);
if (a=9) and (b=1) then
Write(9);
if (a=1) and (b=9) then
Write(9);
if (a=10) and (b=1) then
Write(10);
if (a=1) and (b=10) then
Write(10);
if (a<0) or (b<0) then
Write(0);


End.
