https://www.acmicpc.net/problem/2914
#include <iostream> using namespace std; int main() { int a,i; cin >> a >> i; cout << a*(i-1)+1; }