var s=" "*78++io.Source.stdin for(c<-s.trim)print{s=s.tail+0 (c+"1234567")("#$%LNuvw"count(s(_)==c-4))}