#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 10;
const long long int INF = 2e18 + 10;
const int Mod = 1e9 + 7;
const int MAXN = 1000010;
const int N = 2e5 + 10;
const int M = 210;
const int M1 = 1e9 + 7;
const int M2 = 1e9 + 9;
const int base = 131;
int a[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cout.tie(0);
  int n, ans = 1000, val = 1000;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int l = 1; l < n;) {
    int r = l;
    for (int i = l + 1; i <= n; i++) {
      if (a[i] >= a[i - 1]) {
        r = i;
      } else {
        break;
      }
    }
    if (r == l)
      l++;
    else {
      val = (val / a[l]) * a[r] + (val % a[l]);
      ans = max(ans, val);
      l = r + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
