#include <bits/stdc++.h>
using namespace std;
const double eps = 0.00001;
const int INF = 1000000007;
const long long LINF = 1000000000000000555;
const int N = 550555;
const int M = 1125;
int a[N];
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int money = 1000, soc = 0;
  for (int i = 1; i <= n; i++) {
    int x = i;
    for (int j = i + 1; j <= n; j++) {
      if (a[j] < a[j - 1]) break;
      x = j;
    }
    soc += money / a[i];
    money -= money / a[i] * a[i];
    int mx = a[i];
    for (int j = i; j <= x; j++) {
      if (a[j] > mx) mx = a[j];
    }
    money += soc * mx;
    soc = 0;
    i = x;
  }
  cout << money;
}
int main() {
  ios_base::sync_with_stdio(false);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
