#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long MX = 1e9;
const long long INF = 1e9;
void print_a(vector<int> v) {
  if (v.size()) cout << v[0];
  for (int i = 1; i < v.size(); ++i) cout << ' ' << v[i];
  cout << '\n';
}
vector<vector<int> > init_vvi(int n, int m, int val) {
  return vector<vector<int> >(n, vector<int>(m, val));
}
vector<vector<long long> > init_vvl(int n, int m, long long val) {
  return vector<vector<long long> >(n, vector<long long>(m, val));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long b = 0, s = 1000, l = 0, b1, l1, s1;
  for (int i = 0; i < n; ++i) {
    b1 = s / a[i];
    l1 = s % a[i];
    s1 = (b * a[i]) + l;
    if (b < b1) {
      b = b1;
      l = l1;
    }
    s = max(s, s1);
  }
  cout << s << '\n';
  return 0;
}
