Tile Calculator solution