#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, i = 0;
  cin >> n >> k;
  m = n - 1;
  if ((n % k) == 0) m = n + k;
  while (m < n) {
    m = i * k;
    i++;
  }
  cout << m << "\n";
  return 0;
}
