#include <bits/stdc++.h>
using namespace std;
int n, sum, tot, ans;
int a[400400];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> 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--;
  cout << sum * 1000 - temp * 100;
  return 0;
}
