#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, prem;
  cin >> n >> k;
  n++;
  prem = k;
  if (k > n) {
    cout << k << endl;
  } else {
    while (n > prem) {
      prem += k;
    }
    cout << prem << endl;
  }
}
