dict1 = {"pizza":10,"rice":2,"yogurt":5}
for i in input().split():
    print(dict1[i] if i in dict1 else 8)