#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int taka = 1000, bundle;
  int i, j;
  for (i = 0; i < n - 1;) {
    bundle = 0;
    if (a[i] < a[i + 1]) {
      for (j = i + 2; j < n; j++) {
        if (a[j] < a[j - 1]) {
          break;
        }
      }
      bundle = taka / a[i];
      taka = taka % a[i];
      taka += (bundle * a[j - 1]);
      i = j;
    } else
      i++;
  }
  cout << taka << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
