def main(): x, y, z = map(int, input().split()) print(min(y, z, (x+y+z)//2)) if __name__ == '__main__': main()