#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  int x = 1000;
  for (int i = 0; i < n - 1; i++) {
    while (i < n - 1 && v[i] >= v[i + 1]) i++;
    int p = v[i];
    while (i < n - 1 && v[i] <= v[i + 1]) i++;
    int q = v[i];
    x = (x / p) * q + x - p * (x / p);
  }
  cout << x << endl;
}
int main() {
  solve();
  return 0;
}
