#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
using WeightedGraph = vector<vector<pair<int, int>>>;
const int INF = 2000000000;
const long double PI = acosl(-1);
const int MOD = 1000000007;
void print() { cout << "\n"; }
template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
  cout << head;
  if (sizeof...(tail) != 0) cout << " ";
  print(forward<Tail>(tail)...);
}
template <class T>
void print(vector<T>& vec) {
  for (auto& a : vec) {
    cout << a;
    if (&a != &vec.back()) cout << " ";
  }
  cout << "\n";
}
template <class T>
void print(vector<vector<T>>& df) {
  for (auto& vec : df) {
    print(vec);
  }
}
int longest_increasing_subsequence(int n, vector<int>& A) {
  vector<int> L(n + 1, 0);
  L[0] = A[0];
  int length = 1;
  for (int i = 1; i < n; i++) {
    if (L[length - 1] < A[i])
      L[length++] = A[i];
    else
      *lower_bound(L.begin(), next(L.begin(), length), A[i]) = A[i];
  }
  return length;
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  cout << fixed << setprecision(10);
  int ans = 0;
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; (i) < (int)(N); ++(i)) {
    cin >> A[i];
  }
  vector<int> dp(N, 0);
  dp[0] = 1000;
  for (int i = 1; i < N; i++) {
    dp[i] = dp[i - 1];
    for (int j = 0; (j) < (int)(i); ++(j)) {
      dp[i] = max(dp[i], dp[j] + (A[i] - A[j]) * (dp[j] / A[j]));
    }
  }
  cout << dp[N - 1] << "\n";
  return 0;
}
