#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  if (a == 0)
    cout << 0;
  else if (a % 2 == 1)
    cout << a * b;
  else
    cout << 10 + (a / 2) * 3;
  return 0;
}
