c1,c2,c3 = map(str,input().split()) if ((c1 == '2') and (c2 == '3')) or ((c2 == '3') and (c3 == '2')) : print("1") elif ((c1 == '2') and (c3 == '3') or ((c1 == '3') and (c3 == '2'))) : print("14") else : print("4")