#include <bits/stdc++.h>
using namespace std;
inline void print() { cout << endl; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
  cout << first << ' ';
  print(rest...);
}
void solve() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int money = 1000, stock = 0;
  for (int i = 0; i < N - 1; i++) {
    stock = 0;
    if (A[i] < A[i + 1]) {
      stock = money / A[i];
      money += (A[i + 1] - A[i]) * stock;
    }
  }
  cout << money << '\n';
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
