import sys

def solve():
    """
    Standard CP format for Count Unique Paths in a Grid.
    Input: Two space-separated integers m and n
    Example: 3 3
    """
    input_data = sys.stdin.readline().strip()
    if not input_data:
        return
        
    m, n = map(int, input_data.split())
    
    # Initialize 1D DP array to optimize space from O(m*n) to O(n)
    dp = [1] * n
    
    # Process row by row
    for i in range(1, m):
        for j in range(1, n):
            # dp[j] gets updated with dp[j] (representing top cell) + dp[j-1] (representing left cell)
            dp[j] = dp[j] + dp[j-1]
            
    print(f"Number of Unique Paths = {dp[-1]}")

if __name__ == '__main__':
    solve()