import sys sys.setrecursionlimit(10 ** 6) def LI(): return list(map(int, sys.stdin.readline().split())) def main(): vv=LI() mx=max(vv) ans=200 for a in range(1,mx+1): for b in range(a+1, mx + 1): for c in range(b+1, mx + 1): dp=[200]*(mx+1) dp[0]=0 for i in range(1,mx+1): if i-c>=0:dp[i]=min(dp[i],dp[i-a]+1,dp[i-b]+1,dp[i-c]+1) elif i-b>=0:dp[i]=min(dp[i],dp[i-a]+1,dp[i-b]+1) elif i-a>=0:dp[i]=min(dp[i],dp[i-a]+1) cur=sum(dp[v] for v in vv) if cur