#include <bits/stdc++.h>
int n, sum, tot, ans;
int a[400400];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    sum += a[i] / 1000;
    tot += (a[i] == 1000);
  }
  int temp = sum * 10 / 11;
  if (sum <= 11) temp = sum - a[n] / 1000;
  if (!tot && temp % 2 == 1) temp--;
  printf("%d\n", sum * 1000 - temp * 100);
  return 0;
}
