#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); ++i) cin >> a[i];
  vector<int> t;
  if (a[0] < a[1]) t.push_back(0);
  for (int i = 1; i < n - 1; ++i) {
    if (a[i - 1] >= a[i] && a[i] < a[i + 1]) {
      t.push_back(i);
    }
    if (a[i - 1] < a[i] && a[i] >= a[i + 1]) {
      t.push_back(i);
    }
  }
  if (a[n - 2] < a[n - 1]) t.push_back(n - 1);
  int ans = 1000;
  for (int i = 0; i < (int)t.size() - 1; i += 2) {
    int x = ans / a[t[i]];
    ans += (a[t[i + 1]] - a[t[i]]) * x;
  }
  cout << ans << endl;
  return 0;
}
