#D9500. Special Chat

    ID: 7896 Type: Default 2000ms 536MiB

Special Chat

Special Chat

Problem

The popular video posting site "ZouTube" is now in the midst of an unprecedented "virtual ZouTuber" boom. Among them, the one that has been attracting particular attention recently is the junior virtual ZouTuber "Aizumarim (commonly known as Azurim)".

As a big fan of Azlim, you're going to send her a "special chat" on Azlim's live stream today.

"Special chat" is a "function that viewers give points to distributors" provided by ZouTube. Viewers can spend 500 500 , 1000 1000 , 5000 5000 , or 10000 10000 for each $ 1 special chat, and give the distributor the same amount of points as they spend.

Given the total amount of points you have now, spend those points to find the maximum total amount of points you can give to Azlim. You can have as many special chats as you like, as long as the amount of points you hold is not less than the amount of points you consume.

Constraints

The input satisfies the following conditions.

  • 1 leP le105 1 \ le P \ le 10 ^ 5

Input

The input is given in the following format.

P P

An integer P P representing the total amount of points you have now is given in the 1 1 line.

Output

Output the maximum total amount of points that can be given to Azulim on the 1 1 line.

Examples

Input

5700

Output

5500

Input

1333

Output

1000

Input

100000

Output

100000

inputFormat

input satisfies the following conditions.

  • 1 leP le105 1 \ le P \ le 10 ^ 5

Input

The input is given in the following format.

P P

An integer P P representing the total amount of points you have now is given in the 1 1 line.

outputFormat

Output

Output the maximum total amount of points that can be given to Azulim on the 1 1 line.

Examples

Input

5700

Output

5500

Input

1333

Output

1000

Input

100000

Output

100000

样例

1333
1000