#include <bits/stdc++.h>
using namespace std;
int a[111];
int main() {
  int n, l;
  while (~scanf("%d%d", &n, &l)) {
    int ret = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    int MAX = 0;
    for (int i = l; i <= 100; i++) {
      int ret = 0;
      for (int j = 0; j < n; j++) {
        ret += a[j] / i;
      }
      MAX = max(MAX, ret * i);
    }
    printf("%d\n", MAX);
  }
  return 0;
}
