N,A,B,C=map(int,input().split()) if not (3<=N<=5000):print(aaa) if not (0<=min(A,B,C) and max(A,B,C)<=3):print(aaa)