#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
using ll = long long;
const ll mod = 1e9 + 7;
const int maxn = 1e6 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int has = 1000;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  reverse(a.begin(), a.end());
  int buy = 1e9;
  while (a.size()) {
    int x = a.back();
    a.pop_back();
    if (x <= buy) {
      buy = x;
    } else {
      int afford = has / buy;
      int profit = x - buy;
      has += profit * afford;
      buy = x;
    }
  }
  cout << has << endl;
  return 0;
}
