ans = 0
a = [1,3,5,7,8,10,12]
for i in range(1.13):
	if i in a:
		d = 31
	elif i == 2:
		d = 28
	else:
		d = 30
	for j in range(1,d+1):
		if i == (j%10 + j//10):
			ans += 1
print(ans)