m@main=do c:t<-getLine;print$min 7$sum(2<$['B'..c])-div(-read t)15;m