{$apptype console}
uses
  SysUtils, Math;

var
  n, p : integer;

begin
  reset(input, 'key.in');
  rewrite(output, 'key.out');
  read(n, p);
  assert((1 <= n) and (n <= 1000));
  assert((1 <= p) and (p <= 1000));
  writeln(p + n - 1);
end.
