function Main(input) {
  input = input.split(" ");
  var a = parseInt(input[0]);
  var b = parseInt(input[1]);

  var num = b - a;
  var factorial = function (number) {
    var result = 1;
    for (var i = 1; i < number; i++) {
      result *= number;
    }
  }

  var height = factorial(num);
  var x = height - b;
  console.log(x);
}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));
