using System.Diagnostics;
public static void Main()
var stopWatch = new Stopwatch();
var number = paths(100, 100);
Console.WriteLine(number);
Console.WriteLine(stopWatch.Elapsed);
public static long paths(int n, int m)
var arr = new long [n+1, m+1];
return helper(n, m, arr);
public static long helper(int n, int m, long[,] arr)
arr[n,m] = helper(n - 1, m, arr) + helper(n, m - 1, arr);