# dic = {'Alex': ['subj1', 'subj2', 'subj3'],'David': ['subj1', 'subj2']}
# a=list(dic.values())
# c=0
# for i in a:
#     for j in i:
#         c=c+1
# print(c)


dic = {'Alex': ['subj1', 'subj2', 'subj3'], 'David': ['subj1', 'subj2']}
a = list(dic.values())
c = 0
i=0
for i in a:
    for j in i:
        c = c+1
print(c)








