#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using Pc = pair<double, int>;
using T = tuple<int, int, int>;
using edge = struct {
  int to;
  long long dist;
};
const double PI = 3.141592653589793;
long long fact[2000005], inv[2000005];
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
vector<vector<int>> bingo(3, vector<int>(3));
vector<vector<int>> tree(100005);
int color[100005];
map<P, int> colorMap;
int m = 0;
struct Connection {
  vector<int> connect;
  int parent = 1000000007;
  int dep = 1000000007;
  Connection() {}
};
bool compare_by_second(pair<int, int> a, pair<int, int> b) {
  if (a.second != b.second) {
    return a.second < b.second;
  } else {
    return a.first < b.first;
  }
}
struct UnionFind {
  vector<int> uf;
  UnionFind(int size) : uf(size, -1){};
  int root(int target) {
    if (uf[target] < 0)
      return target;
    else
      return uf[target] = root(uf[target]);
  }
  void merge(int a, int b) {
    a = root(a);
    b = root(b);
    if (a == b) return;
    if (uf[b] < uf[a]) swap(a, b);
    uf[a] += uf[b];
    uf[b] = a;
  }
};
long long CalcPow(long long num, long long power) {
  if (power == 0) return 1;
  if (power % 2 == 0) {
    long long half = CalcPow(num, power / 2);
    return (half * half) % 1000000007;
  } else
    return (num * CalcPow(num, power - 1)) % 1000000007;
}
long long combination(long long all, long long select) {
  if (all < select) return 0;
  if (all < 0 || select < 0) return 0;
  return fact[all] * (inv[select] * inv[all - select] % 1000000007) %
         1000000007;
}
void initCombination(int max) {
  fact[0] = fact[1] = 1;
  for (int i = 2; i <= max; ++i) {
    fact[i] = fact[i - 1] * i % 1000000007;
  }
  inv[max] = CalcPow(fact[max], 1000000007 - 2);
  for (int i = max - 1; 0 <= i; --i) {
    inv[i] = (inv[i + 1] * (i + 1)) % 1000000007;
  }
}
long long getGcd(long long a, long long b) {
  if (a < b) {
    long long temp = b;
    b = a;
    a = temp;
  }
  long long r;
  while ((r = a % b) != 0) {
    a = b;
    b = r;
  }
  return b;
}
enum Color {
  Red,
  Green,
  None,
};
using PC = pair<int, Color>;
string getString(long long num) {
  int iNum = (int)num;
  if (num == 0) iNum += 26;
  iNum += 96;
  char c = int(iNum);
  string rS = "c";
  rS[0] = c;
  return rS;
}
int solve(int current, int x, int n) {
  if (n == 1) return 1;
  if (x < (n * current)) return current;
  solve(n * current, x, n);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  vector<bool> isUp(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    if (1 <= i) isUp[i - 1] = (A[i - 1] < A[i]);
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N; ++i) {
    if (isUp[i]) {
      kabu = money / A[i];
      money = money % A[i];
    } else {
      if (kabu != 0) {
        money += kabu * A[i];
        kabu = 0;
      }
    }
  }
  cout << money << endl;
}
