17 lines
280 B
Python
17 lines
280 B
Python
|
from math import floor
|
||
|
|
||
|
def increaseList(lst, c,m,d):
|
||
|
lst[0] += c
|
||
|
lst[1] += m
|
||
|
lst[2] += d
|
||
|
return lst
|
||
|
n = int(input())
|
||
|
|
||
|
c,m,d = (0,0,0)
|
||
|
|
||
|
for i in range(n):
|
||
|
cmd = [1 if x == "J" else 0 for x in input().split() ]
|
||
|
c,m,d = increaseList(cmd, c,m,d)
|
||
|
|
||
|
|
||
|
print(floor((c+m+d)/3))
|