File standardInput readLines map(a,c:=1;d:=0;a reverse foreach(i,v,d=d+c*(v-48);c=c*(i+1))d println)