Codechef July Challenge, Chef And Rectangle Gnome, 0.24 points.