Under construction

Still being built. Things may change

Deliv-e-droid

Time limit1sMemory limit1024 MB

Summary
Compute the final score from the number of packages delivered and obstacle collisions, using the 50-point reward, 10-point penalty, and 500-point bonus rules.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Statement

In the game Deliv-e-droid, a robot droid must deliver packages while avoiding obstacles. When the game ends, the final score is calculated with these rules:

  • Gain 5050 points for every package delivered.
  • Lose 1010 points for every collision with an obstacle.
  • Earn a 500500 point bonus if the number of packages delivered is greater than the number of collisions with obstacles.

Determine the final score at the end of a game.

Input

The first line contains a non-negative integer PP, the number of packages delivered. The second line contains a non-negative integer CC, the number of collisions with obstacles.

Output

Print a single integer FF, the final score.

Examples2

  1. Example 1

    Input
    5
    2
    
    Expected output
    730
    
  2. Example 2

    Input
    0
    10
    
    Expected output
    -100