Calculating area given dimensions and constraints