#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
};
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
};
const long long INF = 1LL << 60;
int main() {
  int N;
  cin >> N;
  int a[N];
  for (int i = 0; i < (N); i++) cin >> a[i];
  int cnt = 0, money = 1000;
  for (int i = 0; i < (N - 1); i++) {
    if (a[i] < a[i + 1]) {
      cnt += money / a[i];
      money %= a[i];
    } else if (a[i] > a[i + 1]) {
      money += a[i] * cnt;
      cnt = 0;
    }
  }
  money += a[N - 1] * cnt;
  cout << money << endl;
  return 0;
}
