#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long double PI = acos(-1);
const long double E = 2.71828183;
const int MOD = 1e9 + 7;
struct segment_tree {
  vector<unsigned long long> tree;
  int size;
  long long DEF;
  void init(int n) {
    size = 1;
    DEF = INF;
    while (size < n) size *= 2;
    tree = vector<unsigned long long>(2 * size, 0);
  }
  unsigned long long merge(unsigned long long a, unsigned long long b) {
    return a | b;
  }
  bool search(unsigned long long x, int l, int r) {
    int m = (l + r) / 2;
    if (size <= l || size <= r || l > r) return false;
    if (tree[m] == x)
      return true;
    else if (tree[m] > x)
      return search(x, l, m);
    else
      return search(x, m, r);
  }
  bool search(unsigned long long x) { return search(x, 0, size); }
  void set(int i, int x, unsigned long long v, int lx, int rx) {
    if (rx - lx == 1) {
      tree[x] = v;
      return;
    }
    int m = (rx + lx) / 2;
    if (i < m) {
      set(i, 2 * x + 1, v, lx, m);
    } else {
      set(i, 2 * x + 2, v, m, rx);
    }
    tree[x] = merge(tree[2 * x + 1], tree[2 * x + 2]);
  }
  void set(int i, unsigned long long v) { set(i, 0, v, 0, size); }
  unsigned long long sum(int l, int r, int x, int lx, int rx) {
    if (r <= lx || rx <= l)
      return 0;
    else if (l <= lx && rx <= r)
      return tree[x];
    int m = (lx + rx) / 2;
    return merge(sum(l, r, 2 * x + 1, lx, m), sum(l, r, 2 * x + 2, m, rx));
  }
  unsigned long long sum(int l, int r) { return sum(l, r, 0, 0, size); }
  void print() {
    for (int i = 0; i < tree.size(); i++) cout << to_string(tree[i]) << " ";
    cout << "\n";
  }
};
long long gcd(long long a, long long b) {
  return (a % b == 0 ? b : gcd(b, a % b));
}
long double log(long double a, long double b) { return log(b) / log(a); }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long power(long long base, long long exp, long long M = LLONG_MAX) {
  long long res = 1;
  while (exp) {
    if (exp % 2 == 1) res = ((res % M) * (base % M)) % M;
    base = ((base % M) * (base % M)) % M;
    exp /= 2;
  }
  return res;
}
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
list<char> ans;
vector<bool> vis;
bool ok;
void dfs(int src, vector<vector<char>> adj) {
  vis[src] = true;
  for (char nbr : adj[src - 'a']) {
    if (!vis[nbr])
      dfs(nbr, adj);
    else
      ok = false;
  }
  ans.push_back(src);
}
void solve() {
  unsigned long long n;
  cin >> n;
  vector<unsigned long long> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  unsigned long long money = 1000ULL, stocks = 0ULL;
  for (unsigned long long i = 0; i < n - 1; i++) {
    if (v[i] < v[i + 1]) {
      int new_stocks = money / v[i];
      stocks += new_stocks;
      money -= new_stocks * v[i];
    } else {
      money += stocks * v[i];
      stocks = 0ULL;
    }
  }
  cout << money + stocks * v[n - 1] << "\n";
}
