A - Discount Fare Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点: 100100

問題文

AA 駅と BB 駅を結ぶ鉄道があり、運賃は XX 円です。

また、BB 駅と CC 駅を結ぶバスがあり、運賃は YY 円です。

joisinoお姉ちゃんは、AA 駅から BB 駅まで鉄道で移動し、BB 駅から CC 駅までバスで移動すると、バスの運賃が半額になる特別券を手に入れました。

この特別券を用いたとき、AA 駅から CC 駅まで移動するのにいくらかかるか求めてください。

制約

  • 1X,Y1001 \leq X,Y \leq 100
  • YY は偶数
  • 入力は全て整数

入力

入力は以下の形式で標準入力から与えられる。

XX YY

出力

AA 駅から CC 駅まで移動するのに xx 円かかるとき、xx を出力せよ。


入力例 1Copy

Copy
81 58

出力例 1Copy

Copy
110
  • 鉄道の運賃は 8181 円です。
  • バスの運賃は半額となるため、58582=292=29 円です。

よって、AA 駅から CC 駅まで移動するのに 110110 円かかります。


入力例 2Copy

Copy
4 54

出力例 2Copy

Copy
31

Score: 100100 points

Problem Statement

There is a train going from Station AA to Station BB that costs XX yen (the currency of Japan).

Also, there is a bus going from Station BB to Station CC that costs YY yen.

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

How much does it cost to travel from Station AA to Station CC if she uses this ticket?

Constraints

  • 1X,Y1001 \leq X,Y \leq 100
  • YY is an even number.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

XX YY

Output

If it costs xx yen to travel from Station AA to Station CC, print xx.


Sample Input 1Copy

Copy
81 58

Sample Output 1Copy

Copy
110
  • The train fare is 8181 yen.
  • The train fare is 58582=292=29 yen with the 5050% discount.

Thus, it costs 110110 yen to travel from Station AA to Station CC.


Sample Input 2Copy

Copy
4 54

Sample Output 2Copy

Copy
31


2025-03-29 (Sat)
18:30:09 +00:00