V = list(map(int, input().split())) vmax = max(V) INF = 121 ans = INF for i in range(1, vmax - 1): for j in range(i + 1, vmax): for k in range(j + 1, vmax + 1): dp = [INF] * (vmax + 1) dp[0] = 0 for x in [i, j, k]: for l in range(vmax - x + 1): dp[l + x] = min(dp[l + x], dp[l] + 1) tmp = 0 for v in V: tmp += dp[v] ans = min(ans, tmp) print(ans)