#include <stdio.h>

int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    int avr, total;
    total = a + b;
    avr = total/2;

    if(total%2 == 1){
        printf("%d\n", avr + 1);
    }
    else {
        printf("%d\n", avr);
    }

    return 0;
}
