#include <bits/stdc++.h>
using namespace std;
struct Solver {
  void solve() {
    int N;
    cin >> N;
    vector<int> A(N);
    for (int i = 0; i < N; ++i) {
      cin >> A[i];
    }
    int x = 1000;
    for (int i = 1; i < N; ++i) {
      if (A[i] > A[i - 1]) {
        int y = x / A[i - 1];
        x -= y * A[i - 1];
        x += y * A[i];
      }
    }
    cout << x << endl;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  Solver().solve();
  return 0;
}
