# coding=utf-8
from datetime import datetime
import sys
v, w = map(int, input().split())
a = []
def getDif(a, b):
# 通过datetime模块计算时间差
# 例如 传入 08:03 和 08:08 ,返回5
a = datetime.strptime(a, "%H:%M")
b = datetime.strptime(b, "%H:%M")
return (b - a).seconds // 60
def getCnt(first, last):
p = first
k = 1
s1 = a[first][2:]
for i in range(first + 1, last):
s2 = a[i][2:]
if __________:
k += 1
p = i
__________
return k
for line in sys.stdin:
a.append(line.strip()) # 删除结尾的换行符
a.append(" ")
ans = 0
n = len(a)
j = 0
for i in range(1, n):
if a[j][0] != a[i][0]:
__________
j = i
print(ans)