Program to find the cost of tiling a space