# Enter your code here. Read input from STDIN. Print output to STDOUT a = map(int,raw_input().strip().split(' ')) if a[2]>=1 and a[2]<=10**18: if a[0] >=1 and a[0]<=100 and a[1]>=1 and a[1]<=100: ans = 0.5*a[0]+0.5*a[1] print int(ans%(10**9+7))