The total number of BSTs is described by the function: (2n)! / ((n+1)! n!)

```
class Solution(object):
def numTrees(self, n):
"""
:type n: int
:rtype: int
"""
return factorial(2 * n) / (factorial(n+1) * factorial(n))
def factorial(n):
return 1 if n == 0 else n * factorial(n-1)
```