#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long int BtoPmodM(long long int b, long long int p, long long int m) {
  b %= m;
  if (p == 0)
    return 1;
  else if (p % 2 == 0)
    return (BtoPmodM(b, p / 2, m) * BtoPmodM(b, p / 2, m)) % m;
  else if (p % 2 == 1)
    return (BtoPmodM(b, (p - 1) / 2, m) * BtoPmodM(b, (p - 1) / 2, m) * b) % m;
  else
    return 0;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool coprime(long long int a, long long int b) {
  if (gcd(a, b) == 1)
    return true;
  else
    return false;
}
long long int factModP(long long int n, long long int p) {
  long long int fac[n - 1];
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i % p;
  }
  return fac[n];
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y /= 2;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int nCrModP(long long int n, long long int r, long long int p) {
  if (r == 0)
    return 1;
  else if (r > n)
    return 0;
  long long int fac[n + 1];
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i % p;
  }
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
long long int nCr(long long int n, long long int r) {
  long long int ans = 1;
  if (r >= n - r) {
    for (long long int i = r + 1; i <= n; i++) ans *= i;
    for (long long int i = 1; i <= n - r; i++) ans /= i;
  } else {
    for (long long int i = n - r + 1; i <= n; i++) ans *= i;
    for (long long int i = 1; i <= r; i++) ans /= i;
  }
  return ans;
}
long long int string_to_int(string str) {
  int strl = str.length();
  long long int ans = 0;
  if (str[0] == '-') {
    for (int i = 1; i < strl; i++) ans += pow(10, strl - i - 1) * (str[i] - 48);
    ans = 0 - ans;
    return ans;
  }
  for (int i = 0; i < strl; i++) ans += pow(10, strl - i - 1) * (str[i] - 48);
  return ans;
}
struct edge_stru {
  int u, v, w;
};
edge_stru make_edge_stru(int u, int v, int w) {
  edge_stru a = {u, v, w};
  return a;
}
class cmp {
 public:
  bool operator()(edge_stru a, edge_stru b) { return a.w > b.w; }
};
void make_set(int v, int* parent, int* rank) {
  parent[v] = v;
  rank[v] = 0;
  return;
}
int find_set(int v, int* parent) {
  if (v == parent[v]) return v;
  return find_set(parent[v], parent);
}
void union_sets(int a, int b, int* parent, int* rank) {
  if (rank[a] > rank[b]) swap(a, b);
  parent[b] = a;
  if (rank[a] == rank[b]) rank[b]++;
  return;
}
bool binSearch(long long* arr, long long n, long long target) {
  unsigned long long l = 0, r = n - 1;
  while (l < r) {
    int mid = (l + r) / 2;
    if (arr[mid] >= target) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  if (arr[l] == target) {
    return true;
  } else {
    return false;
  }
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int tot = 1000;
  for (int i = 1; i < n; i++) {
    int cnt = 0;
    while (tot >= a[i - 1]) {
      tot -= a[i - 1];
      cnt++;
    }
    tot += a[i] * cnt;
  }
  cout << tot << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
