#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
bool sortcol(const vector<int>& v1, const vector<int>& v2) {
  return v1[1] < v2[1];
}
void fastio() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool sortbysecdesc(const pair<long long int, long long int>& a,
                   const pair<long long int, long long int>& b) {
  if (a.first > b.first) return true;
  if (a.first == b.first) return a.second < b.second;
  return false;
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int x = 1000;
  int y = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1]) continue;
    if (a[i] > a[i + 1]) {
      x += a[i] * y;
      y = 0;
    } else {
      int t = x / a[i];
      x -= t * a[i];
      y += t;
    }
  }
  x += a[n - 1] * y;
  cout << x << "\n";
}
int main() { solve(); }
