#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const int INF = 1001001001;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 2);
  a[0] = INF;
  for (int i = (0); i < (n); ++i) cin >> a[i + 1];
  a[n + 1] = 0;
  int x = 1000;
  int num = 0;
  for (int i = (0); i < (n + 1); ++i) {
    if (i == 0) continue;
    if (a[i] == a[i - 1] && a[i] == a[i + 1]) continue;
    if (a[i] <= a[i + 1]) {
      int tmp = x / a[i];
      num += tmp;
      x -= a[i] * tmp;
    } else if (a[i] >= a[i + 1]) {
      x += a[i] * num;
      num = 0;
    }
  }
  cout << x << endl;
  return 0;
}
