#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
void hr() { cerr << "--------------" << endl; }
const int INF = 1001001001;
const int MOD = 1000000007;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int kb = 0, money = 1000;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1]) {
      kb += money / a[i];
      money -= money / a[i] * a[i];
    }
    if (a[i] > a[i + 1]) {
      money += kb * a[i];
      kb = 0;
    }
  }
  money += kb * a[n - 1];
  cout << money << endl;
  return 0;
}
