#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1000000007;
const long long INF = 999999999999999999;
const long long NN = (long long)(1e6 + 5);
long long min(long long x, long long y) {
  if (x < y) return x;
  return y;
}
long long max(long long x, long long y) {
  if (x > y) return x;
  return y;
}
long long power(long long x, unsigned long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
long long hcf(long long a, long long b) {
  if (b == 0) return a;
  return hcf(b, a % b);
}
long long n;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long TT = 1;
  while (TT--) {
    cin >> n;
    v.resize(n);
    long long stock = 0, money = 1000, last = n, i;
    for (auto &u : v) cin >> u;
    for (i = 0; i < n - 1; i++) {
      if (v[i + 1] > v[i]) {
        stock += money / v[i];
        money -= (v[i] * stock);
        last = i;
        break;
      }
    }
    for (i = last; i < n; i++) {
      if (v[i] == v[last]) continue;
      if (v[i] > v[last]) {
        money += (stock * v[i]);
        stock = 0;
        last = i;
      } else {
        stock += (money / v[i]);
        money -= (money / v[i]) * v[i];
        last = i;
      }
    }
    if (stock) money += stock * v[n - 1];
    cout << money;
  }
}
