#include #include int main() { int x, y, z; scanf("%d%d%d",&x,&y,&z); for(;;){ x>y?y++:x++; z--; if(!z)break; } printf("%d",x>y?y:x); }