# -*- coding: utf-8 -*- """ No.91 赤、緑、青の石 https://yukicoder.me/problems/no/91 """ import sys from sys import stdin input = stdin.readline def main(args): ans = 0 stones = [int(x) for x in input().split()] stones.sort(reverse=True) m = stones[2] stones[0] -= m stones[1] -= m stones[2] -= m ans += m for i in range(100): stones.sort(reverse=True) if stones[1] == 0 and stones[2] == 0: m = stones[0] * 2 // 5 ans += m break elif stones[0] == stones[1]: stones[2] += stones[0] //3 stones[2] += stones[1] //3 m = min(stones) ans += m break gap12 = stones[1] - stones[2] gap01 = stones[0] - stones[1] if gap12 * 2 > gap01: stones[2] = gap01 // 2 stones[0] -= stones[2] * 2 else: stones[2] = gap12 stones[0] -= stones[2] * 2 m = stones[2] stones[0] -= m stones[1] -= m stones[2] -= m ans += m print(ans) if __name__ == '__main__': main(sys.argv[1:])