#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, e, f;
  cin >> a >> b;
  d = b * 0.5;
  e = 2 * b - 1;
  f = d * e;
  c = a + 2 * b + f;
  cout << c << endl;
  return 0;
}
