#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const long long LINF = 1e18;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int t = 1000;
  int k = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i + 1] > a[i]) {
      k = t / a[i];
      t -= a[i] * k;
      t += a[i + 1] * k;
    }
  }
  cout << t << endl;
}
