#include <bits/stdc++.h>
using namespace std;
const long long N = 85, M = 1e4 + 5, INF = 1e9;
int main() {
  int n;
  cin >> n;
  int a[N];
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int ans = 1000;
  vector<pair<int, int> > sell;
  int p = 0;
  int f;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i + 1] && p == 1) {
      p = 0;
      sell.push_back({f, a[i]});
      continue;
    }
    if (a[i] < a[i + 1] && p == 0) {
      p = 1;
      f = a[i];
    }
  }
  for (int i = 0; i < sell.size(); i++) {
    int plust = ans % sell[i].first;
    ans = ((ans / sell[i].first) * sell[i].second);
    ans += plust;
  }
  cout << ans << endl;
}
