P23587 [AtCoder] Number of Final Round Participants
普及
题目描述

Problem Description

You are planning to host a programming contest consisting of a qualifying round and a final round. To do this, you need to decide how many participants to allow in the final round.

The number of final round participants must satisfy the following two conditions:

  • Due to the size of the venue, the number of participants must not exceed $A$.
  • For the networking event, participants will be seated at tables that accommodate $B$ people each, so the number of participants must be a multiple of $B$.

You want as many people as possible to participate in the final round. Find the maximum number of final round participants that satisfies these two conditions.

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $

Output Format

Output the answer.

Sample Input and Output

Sample Input #1

79
6

Sample Output #1

78

Sample Input #2

100
100

Sample Output #2

100

Sample Input #3

43
5

Sample Output #3

40

Sample Input #4

56
1

Sample Output #4

56

Notes/Hints

Constraints

  • $1 \leq B \leq A \leq 100$

Sample Explanation 1

$ 78 $ satisfies the first condition because it is less than $ A = 79 $. It also satisfies the second condition because it is a multiple of $ B = 6 $. This value is the maximum that satisfies both conditions.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
79 6
样例输出
78