main(c,b)char*b;{for(;gets(b);c=c<1||puts())while(*b)'Xz'%*b++?--c:++c;}