input: Write a python function to calculate how many possible paths are there from one point to another in a given grid.
  assert num_paths(3, 3) == 6
  assert num_paths(2, 2) == 2
  assert num_paths(4, 4) == 20
output: def num_paths(m, n):
      if m == 1 or n == 1:
          return 1
      return num_paths(m - 1, n) + num_paths(m, n - 1)