Map size program using recursion