#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int a[100];
int n;
int memo[100][100];
int main(void) {
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> a[i];
  ll ans = 1000;
  for (int i = n - 1; i >= 0; i--) {
    for (int j = i - 1; j >= 0; j--) {
      if (a[i] > a[j]) {
        memo[i][j] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      if (memo[j][i] == 1) {
        int katta = ans / a[i];
        ans += katta * a[j];
        ans -= katta * a[i];
        i = j;
      }
    }
  }
  ll ans2 = 1000;
  for (int i = 0; i < n; i++) {
    int mx = 0, cnt = -1;
    for (int j = i; j < n; j++) {
      if (memo[j][i] == 1) {
        if (mx < (a[j] - a[i])) {
          mx = (a[j] - a[i]);
          cnt = j;
        }
      }
    }
    int katta = ans2 / a[i];
    ans2 += katta * a[cnt];
    ans2 -= katta * a[cnt];
    i = cnt;
  }
  cout << max(ans2, ans) << endl;
}
