#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 101;
int n, l;
int a[MAX_N];
int main() {
  scanf("%d%d", &n, &l);
  bool f = false;
  int ans = 0, cnt = 0;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    if (x >= l) {
      a[cnt++] = x;
      f = true;
    }
  }
  if (!f)
    puts("0");
  else {
    for (int i = l; i < MAX_N; ++i) {
      int sum = 0;
      for (int j = 0; j < cnt; ++j) {
        sum += a[j] / i * i;
      }
      ans = max(ans, sum);
    }
    printf("%d\n", ans);
  }
  return 0;
}
