#!/usr/bin/env python

# Starting in the top left corner of a 2 x 2 grid, there are 6 routes (without backtracking) to the bottom right corner.
# How many routes are there through a 20 x 20 grid?

from math import factorial

from python_code.decorators import euler_timer

@euler_timer(15)
def main():
    # In an n x m grid there are (n + m) C m = (n + m) C n such paths.
    print factorial(20 + 20)/(factorial(20)*factorial(20))

if __name__ == "__main__":
    main()
