#include <bits/stdc++.h>
using namespace std;
int keta(long long x) {
  if (x < 10) {
    return 1;
  } else {
    return keta(x / 10) + 1;
  }
}
int keta_wa(long long x) {
  if (x < 10) {
    return x;
  } else {
    return keta_wa(x / 10) + x % 10;
  }
}
int ctoi(char c) { return ((c >= '0' && c <= '9') ? c - '0' : 0); }
int __stoi(string s) { return atoi(s.c_str()); }
long long sum(long long a[], long long N) { return accumulate(a, a + N, 0LL); }
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
long long lcm(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  return a / gcd(a, b) * b;
}
template <class T>
void chmax(T& a, T b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
void chmin(T& a, T b) {
  if (a > b) {
    a = b;
  }
}
template <class T>
bool isIn(T a, vector<T> v) {
  for (T x : v) {
    if (a == x) {
      return true;
    }
  }
  return false;
}
string strReplace(string s, string target, string replacement) {
  if (!target.empty()) {
    std::string::size_type pos = 0;
    while ((pos = s.find(target, pos)) != std::string::npos) {
      s.replace(pos, target.length(), replacement);
      pos += replacement.length();
    }
  }
  return s;
}
const long long MOD = 1e9 + 7;
bool DEBUG = 0;
template <class T>
void dprint(T s) {
  if (DEBUG) {
    cout << s << "\n";
  }
}
int main(int argc, char* argv[]) {
  if (argc > 1 && argv[1][0] == 'D') {
    DEBUG = 1;
  }
  dprint("start");
  int N;
  cin >> N;
  int a[N];
  ;
  for (int i = 0, i_len = ((N)); i < i_len; ++i) {
    cin >> (a)[i];
  };
  long long money = 1000;
  int but = 1000;
  for (int i = 0; i < N; ++i) {
    if (a[i] < but) {
      but = a[i];
    } else if (but < a[i]) {
      if (i == N - 1 || a[i] >= a[i + 1]) {
        int sp = money / but;
        money -= sp * but;
        money += a[i] * sp;
        but = 1000;
      }
    }
  }
  cout << money << "\n";
}
