/
Time Limit: 2 sec / Memory Limit: 1024 MiB
問題文
競技プログラミングサイト AtCoder では、各ユーザーの実力を「レーティング」と呼ばれる数値で表します。 ユーザーがプログラミングコンテストに参加すると、そのコンテストにおけるユーザーの成績が「パフォーマンス」と呼ばれる数値で表され、その値に応じてユーザーのレーティングが変化します。
ユーザーのコンテスト前のレーティングが R であり、コンテストでのパフォーマンスが P のとき、 そのユーザーのコンテスト後のレーティング R' は、近似的に次の式で表されます。
R' = \lfloor 0.9 \times R + 0.1 \times P \rfloor
ただし、\lfloor x \rfloor は x を超えない最大の整数を表します。
入力として R と P が与えられるので、上記の近似式に基づき R' を計算して出力してください。
制約
- 1 \leq R, P \leq 4400
- R, P は整数
入力
入力は以下の形式で標準入力から与えられる。
R P
出力
答えを整数として出力せよ。
入力例 1
2516 2320
出力例 1
2496
R' = \lfloor 0.9 \times 2516 + 0.1 \times 2320 \rfloor = \lfloor 2496.4 \rfloor = 2496 です。
入力例 2
2498 3200
出力例 2
2568
入力例 3
1 1
出力例 3
1
Problem Statement
On AtCoder, the competitive programming website, each user is graded by a value called rating. Every time a user participates in a programming contest, their performance is quantified and affects their rating.
If a user's rating before a contest is R and their performance in the contest is P, their rating after the contest R' is approximated by:
R' = \lfloor 0.9 \times R + 0.1 \times P \rfloor,
where \lfloor x \rfloor represents the maximum integer not exceeding x.
Given R and P as input, evaluate and print R' according to the approximation formula above.
Constraints
- 1 \leq R, P \leq 4400
- R and P are integers.
Input
The input is given from Standard Input in the following format:
R P
Output
Print the answer as an integer.
Sample Input 1
2516 2320
Sample Output 1
2496
We have R' = \lfloor 0.9 \times 2516 + 0.1 \times 2320 \rfloor = \lfloor 2496.4 \rfloor = 2496.
Sample Input 2
2498 3200
Sample Output 2
2568
Sample Input 3
1 1
Sample Output 3
1