var a1, b, n:longint; begin read(a1, n); b := 1; writeln(a1 +b *(n - 1)); end.