Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official. ×

C. Counting Fridays
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Judging from the previous problem, Friday the 13th really doesn't treat you well, so you start thinking about how to minimize its impact on your life. You are a passionate participant of programming contests, so various competitions are an important part of your schedule. Naturally, you'd like as few of them to be spoiled as possible.

A friendly admin leaked to you the list of dates on which the contests will be held for several years ahead. Check how many of them happen to take place on Friday the 13th of any month.

Input

The first line of the input contains an integer n (1 ≤ n ≤ 10) — the number of the contests you have been told about. The following n lines contain dates of these contests, one per line, formatted as "YYYY-MM-DD" (1974  ≤  YYYY  ≤  2030; 01  ≤  MM  ≤  12; 01  ≤  DD  ≤  31). It's guarateed that all the given dates are correct. Two distinct contests may be at the same day.

Output

Output a single integer — the number of dates which happen to be Friday the 13th.

Examples
Input
52012-01-132012-09-132012-11-202013-09-132013-09-20
Output
2