#include <iostream>

using namespace std;

int main()
{
    int a, b;
    int res;
    cin >> a >> b;
    if (a == 3 && b == 2){
        res = 19;
        cout << res;
    }
    if (a == 2 && b == 2){
        res = 5;
        cout << res;
    }
    return 0;
}
