#include int main() { int x, y, z; scanf("%d%d%d",&x,&y,&z); if (x > y) { z -= x - y; } else { z -= y - x; x = y; } printf("%d",x+z/2); }