"use strict";

// 順列 被りなし
const permutateWithoutRepetitions = permutationOptions => {
  if (permutationOptions.length === 1) {
    return [permutationOptions];
  }

  const permutations = [];

  const smallerPermutations = permutateWithoutRepetitions(permutationOptions.slice(1));

  const firstOption = permutationOptions[0];

  for (let permIndex = 0; permIndex < smallerPermutations.length; permIndex += 1) {
    const smallerPermutation = smallerPermutations[permIndex];

    for (let positionIndex = 0; positionIndex <= smallerPermutation.length; positionIndex += 1) {
      const permutationPrefix = smallerPermutation.slice(0, positionIndex);
      const permutationSuffix = smallerPermutation.slice(positionIndex);
      permutations.push(permutationPrefix.concat([firstOption], permutationSuffix));
    }
  }

  return permutations;
}

const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const M = parseInt(arg[0].split(" ")[1]);
    
    let monkeys = [];
    let dogs  = [];
    
    for(let i=0; i<N; i++) {
        monkeys.push(i * 2);
    }
    
    for(let i=1; i<M*2; i+=2) {
        dogs.push(i);
    }
    
    let permutation = permutateWithoutRepetitions([...monkeys, ...dogs]);
    let answer = 0;
    
    for(let i in permutation) {
        let flag = true;
        
        for(let j in permutation[i]) {
            if(parseInt(j) === permutation[i].length - 1) break;
            
            let targetNum = permutation[i][j];
            let nextNum   = permutation[i][parseInt(j) + 1];
            
            if((targetNum + nextNum) % 2 === 0) {
                flag = false;
                break;
            }
        }
        
        if(flag) {
            //console.log(permutation[i] + "は条件を満たす")
            answer++;
        }
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));