#include <iostream>
#include <cmath>
using namespace std;

int main ()
{
    int c,i,izlaz;
    cin >> c >> i;
    izlaz = ceil (c * (i-1) +1);
    cout << izlaz;
    //system ("pause");
    return 0;
}
