V = list(map(int, input().split())) vmax = max(V) INF = 121 ans = INF for i in range(1, 29): for j in range(i + 1, 30): for k in range(j + 1, 31): dp = [INF] * 31 dp[0] = 0 for x in [i, j, k]: for l in range(31 - x): 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)