j=(1<$[0..8])<>zipWith(+)j(drop 2 j) d n=sum.map(\i->j!!((8-i)+n)) main=interact$show.((,).d 256<*>d 80).read.('[':).(++"]")