#!/usr/bin/perl
use 5.10.0;
for(1..<>){$u+=length sprintf"%b",$_;$n++}$u/=$n;say$u