#include <stdio.h>

#define PER_INT 100000
#define MAX_LENGTH 2000

int pc[2], c[2][MAX_LENGTH];

// Set the big number "a" to the value of int number "b".
void set(int a, int b)
{
	c[a][0]=b;
	pc[a]=1;
}

// Multiplication: Set big "a" to big "a" by int "b"
void mul(int a, int b)
{
	int z=0;
	for (int i=0; i<pc[a]; i++)
	{
		c[a][i] = c[a][i]*b + z;
		z = c[a][i] / PER_INT;
		c[a][i] %= PER_INT;
	}
	if (z)
	{
		c[a][pc[a]++] = z;
	}
}

// Sum: Set big "a" to big "a" plus big "b".
void add(int a, int b)
{
	int z=0;
	for (int i=0; i<pc[a] || i<pc[b]; i++)
	{
		if (i==pc[a]) c[a][pc[a]++]=0;
		if (i>=pc[b]) c[b][i]=0;
		c[a][i] = c[a][i] + c[b][i] + z;
		z = c[a][i] / PER_INT;
		c[a][i] %= PER_INT;
	}
	if (z)
	{
		c[a][pc[a]++] = z;
	}
}

void write(int a)
{
	printf("%d", c[a][pc[a]-1]);
	for (int i=pc[a]-2; i>=0; i--) printf("%0.5d", c[a][i]);
	printf("\n");
}

int main(void)
{
	int a,b;
	scanf("%d %d", &a, &b);
	
	// Factorial of the number a.
	set(0, 1);
	for (int i=2; i<=a; i++) mul(0, i);

	// Factorial of the number b.
	set(1, 1);
	for (int i=2; i<=b; i++) mul(1, i);

	// Sum of the factorials.
	add(0, 1);

	write(0);

	return 0;
}
