import math n,m = map(int,raw_input().split()) mul = float((n+m))/2 print(int(math.ceil(mul)))