b:=0 a:=File standardInput readLines map(asNumber) a map(i,v,if(i==b,b=i+v+1,if((v abs|0)==v,(v-2)*180,"Invalid input")println))