跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1598. Bar

    ID: 1604 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 1 上传者: 标签>模拟编程与模拟入门难度共享题库Codeforces英文题面题目来源题面语言

Bar

题目描述

A. Bar
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

According to Berland laws it is only allowed to sell alcohol to people not younger than 18 years. Vasya's job is to monitor the law's enforcement. Tonight he entered a bar and saw n people sitting there. For every one of them Vasya happened to determine either the age or the drink the person is having. Vasya can check any person, i.e. learn his age and the drink he is having at the same time. What minimal number of people should Vasya check additionally to make sure that there are no clients under 18 having alcohol drinks?

The list of all alcohol drinks in Berland is: ABSINTH, BEER, BRANDY, CHAMPAGNE, GIN, RUM, SAKE, TEQUILA, VODKA, WHISKEY, WINE

Input

The first line contains an integer n (1≤n≤100) which is the number of the bar's clients. Then follow n lines, each describing one visitor. A line either contains his age (an integer from 0 to 1000) or his drink (a string of capital Latin letters from 1 to 100 in length). It is guaranteed that the input data does not contain spaces and other unnecessary separators.

Only the drinks from the list given above should be considered alcohol.

Output

Print a single number which is the number of people Vasya should check to guarantee the law enforcement.

Examples
Input
5
18
VODKA
COKE
19
17
Output
2
Note

In the sample test the second and fifth clients should be checked.


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 1121 题。保留原作者与原赛事署名。