#include <bits/stdc++.h>
int N, L;
int* a;
int main() {
  scanf("%d %d", &N, &L);
  a = (int*)malloc(sizeof(int) * N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  int max = 0;
  int maxI = 0;
  int vol = 0;
  for (int i = L; i <= N * L * 100; i++) {
    vol = 0;
    for (int j = 0; j < N; j++) vol += i * (a[j] / i);
    if (vol == 0) break;
    if (vol > max) {
      max = vol;
    }
  }
  printf("%d", max);
  return 0;
}
