s;main(k){for(;k="œÿöÎû"[getchar()%23%8];s=k-2?s+k-s%k*2:!printf("%d\n",s))k*=k>0?:~9;}