r="0123456789AB" m@main=do t<-getLine;putStrLn$([pure,\x->['1',x]]<*>r)!!sum[1|x<-t,y<-r,y