A tall building has 10^N floors, numbered from floor 0 through floor 10^N - 1. Each floor number is shown with exactly N digits. If a floor number has fewer than N digits, leading zeroes are added.
One digit is displayed using 15 lamps arranged in a grid of height 5 and width 3. The following grid shows the digits from 0 through 9. # means the lamp is on, and . means the lamp is off.
You are given the current state of the elevator floor display. Adjacent digits are separated by one column of off lamps. Some lamps may be broken and therefore always remain off. Assuming that some of the currently off lamps may be broken, compute the average of all floor numbers that the display could currently represent.