a=gets.split() c=0 e=0 for i in a if(i[0]>98) c+=1 else e+=1 puts(c-e) end end