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