#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cout << x; }
void __print(long x) { cout << x; }
void __print(long long x) { cout << x; }
void __print(unsigned x) { cout << x; }
void __print(unsigned long x) { cout << x; }
void __print(unsigned long long x) { cout << x; }
void __print(float x) { cout << x; }
void __print(double x) { cout << x; }
void __print(long double x) { cout << x; }
void __print(char x) { cout << '\'' << x << '\''; }
void __print(const char *x) { cout << '\"' << x << '\"'; }
void __print(const string &x) { cout << '\"' << x << '\"'; }
void __print(bool x) { cout << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cout << '{';
  __print(x.first);
  cout << ',';
  __print(x.second);
  cout << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cout << '{';
  for (auto &i : x) cout << (f++ ? "," : ""), __print(i);
  cout << "}";
}
void _print() { cout << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cout << ", ";
  _print(v...);
}
const long double PI = 3.141592653589793238462643383;
long long Ceil(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return (a / b) + 1;
}
long long p = 1000000007;
float E = 0.00000000000001;
long long power(long long x, long long y, long long p = 1000000007) {
  if (y == 0) {
    return 1;
  }
  if (y % 2 == 0) {
    long long q = power(x, y / 2);
    q = q % p;
    return (q * q) % p;
  }
  long long q = power(x, y / 2);
  q = q % p;
  return ((x % p) * ((q * q) % p)) % p;
}
bool isPowerOfTwo(long long x) { return x && (!(x & (x - 1))); }
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int mod(long long int a, long long int b) {
  long long int ret = a % b;
  return ret >= 0 ? ret : ret + b;
}
int count_mod(string &x, int num) {
  long long n = x.size();
  long long ans = 0;
  for (long long i = n - 1; i >= 0; i--) {
    if (x[i] == '1') {
      ans += power(2, n - i - 1, num);
      ans %= num;
    }
  }
  return ans;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto &x : a) cin >> x;
    int ans = 1000;
    for (int i = 1; i < n; i++) {
      if (a[i] <= a[i - 1])
        continue;
      else {
        int stocks = ans / a[i - 1];
        ans %= a[i - 1];
        ans += stocks * a[i];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
