#import <stdio.h>

int c(double num) {
    long inum = (long)num;
    return (int)(inum + (((num != inum) && (num > 0)) ? 1 : 0));
}


int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d", c((double)(a+b)/2.0));
}
