49

There must be a better way to do this (without two base cases). Any ideas?