*a;main(x){for(;x=~getchar()%69;a[x&8]+=x/12*2+1);*a=!printf("%f",sqrt(--*a**a+a[8]*a[8]));}