#include <iostream>

using namespace std;

int main()
{
    int N,M,i,A[i],X[i],Y[i];
    cin>>N>>M>>i;
    if (N<=10 && M<=10)
    {
        switch (N)
        {
        case 1 : case 3 : case 5 : case 7 : case 10 :
            M==1;
            break ;
        case 2:  case 4: case 6 : case 8 : case 9 :
            M==2;
            break;
        default :
            cout<<endl;
        }
    }cout<<M*2<<endl;


    return 0;
}