cnt = 0
for i in range(12):
    for j in range(31):
        if i+1 == j//10 + j%10:
            cnt += 1

print(cnt)