import sys def input(): return sys.stdin.readline().rstrip() def main(): r, g, b = sorted(map(int, input().split())) ans = r g -= r b -= r r = 0 lim = min((b-g)//2, g) ans += lim g -= lim b -= 3*lim if g == 0: ans += b // 5 else: lim = g // 4 g -= lim * 4 b -= lim * 4 ans += lim * 2 if g >= 1 and b >= 3: ans += 1 print(ans) if __name__ == '__main__': main()