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


if __name__ == '__main__':
    main()