#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vc = vector<char>;
using vvc = vector<vc>;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using tiii = tuple<int, int, int>;
using vpii = vector<pii>;
using vpil = vector<pil>;
using vpli = vector<pli>;
using vpll = vector<pll>;
int INF = 1e9 + 7;
int main() {
  int N;
  cin >> N;
  vi A(N);
  for (int i = 0; i < (int)N; i++) cin >> A[i];
  int money = 1000, stock = 0, d = -1;
  for (int i = 0; i < (int)N - 1; i++) {
    if (A[i] < A[i + 1] && d == -1) {
      stock = money / A[i];
      money %= A[i];
      d = 1;
    } else if (A[i] > A[i + 1] && d == 1) {
      money += stock * A[i];
      stock = 0;
      d = -1;
    }
  }
  money += stock * A[N - 1];
  cout << money << endl;
}
