#include <bits/stdc++.h>
using namespace std;
const int64_t MAXN = 2005;
const int ALPHA = 26;
int64_t N, K, M;
int64_t X, Y, Z;
int64_t A, B, C;
vector<int64_t> ID;
vector<int64_t> SZ;
int find(int x) {
  if (ID[x] == x) return x;
  return find(ID[x]);
}
void Union(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (SZ[x] > SZ[y]) {
    ID[y] = x;
    SZ[x] += SZ[y];
  } else {
    ID[x] = y;
    SZ[y] += SZ[x];
  }
  return;
}
string common_prefix(string s, string t) {
  string ans = "";
  for (int i = 0; i < min(s.length(), t.length()); ++i) {
    if (s[i] == t[i])
      ans.push_back(s[i]);
    else
      break;
  }
  return ans;
}
string LCP(vector<string> A, int l, int r) {
  if (l > r) return "";
  if (l == r) return A[l];
  int mid = (l + r) / 2;
  string left = LCP(A, l, mid);
  string right = LCP(A, mid + 1, r);
  return common_prefix(left, right);
}
int main() {
  int t;
  t = 1;
  while (t--) {
    cin >> N;
    vector<int64_t> A(N);
    for (auto &x : A) cin >> x;
    vector<int64_t> news;
    for (int i = 0; i < N; ++i) {
      if (!news.size() || news.back() != A[i]) news.push_back(A[i]);
    }
    int64_t ans = 0;
    int64_t have = 1000;
    for (int i = 0; i + 1 < news.size(); ++i) {
      if (news[i] >= news[i + 1]) continue;
      int64_t nbought = have / news[i];
      have -= nbought * news[i];
      have += news[i + 1] * nbought;
      i++;
    }
    cout << have << "\n";
  }
}
