Problem:
Score: 100 points

Problem Statement

There is a train going from Station A to Station B that costs X yen (the currency of Japan).

Also, there is a bus going from Station B to Station C that costs Y yen.

Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus.

How much does it cost to travel from Station A to Station C if she uses this ticket?

Constraints

1 \leq X,Y \leq 100

Y is an even number.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If it costs x yen to travel from Station A to Station C, print x.

Sample Input 1

81 58

Sample Output 1

110

The train fare is 81 yen.

The train fare is 58 ⁄ 2=29 yen with the 50% discount.

Thus, it costs 110 yen to travel from Station A to Station C.

Sample Input 2

4 54

Sample Output 2

31

Solution in Fortran (gfortran v4.8.4) (judge verdict: Runtime Error)

program test
implicit none

integer(8) :: h,w,k,i,j,ans,big=1d9+7
integer(8) :: go(0:10,3)=0,br_a(0:10),br_b(0:10),dp(0:200,0:10)=0

read(*,*) h,w,k

!最後に橋あり→a,なし→b

br_a(0)=0
br_b(0)=0

br_a(1)=0
br_b(1)=1

do i=2,w
	br_a(i) = br_b(i-1)
	br_b(i) = mod(br_b(i-1) + br_a(i-1),big)
enddo

!左に行く
do i=1,w
	if(i==1) then
		go(i,1) = 0
	else
		go(i,1) = mod(br_b(i-1) * br_b(w-i+1),big)
	endif
enddo

!右に行く
do i=1,w
	go(i,3) = go(w+1-i,1)
enddo

!どちらでもない
do i=1,w
	go(i,2) = mod((br_a(w)+br_b(w)) - go(i,1) - go(i,3),big)
enddo

!とりあえずDPっしょ
dp(0,1)=1
do i=1,h
	do j=1,w
		dp(i,j) = mod(dp(i-1,j-1)*go(j-1,3) +dp(i-1,j)*go(j,2) +dp(i-1,j+1)*go(j+1,1),big)
	enddo
enddo

write(*,*) dp(h,k)

end program