#include <bits/stdc++.h>
using namespace std;
int a[101], n;
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int rem = 1000;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  a[n++] = -1;
  for (int i = 0; i < n; ++i) {
    int mx = a[i];
    for (int j = i + 1; j < n; ++j) {
      mx = max(mx, a[j]);
      if (a[j] < mx) {
        int cnt = rem / a[i];
        rem = cnt * mx + (rem % a[i]);
        i = j - 1;
        break;
      }
    }
  }
  cout << rem << endl;
  return 0;
}
