#include <bits/stdc++.h>
using namespace std;
const int N = 82;
int A[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  int c = 1e3;
  for (int i = 1; i + 1 <= n; i++) {
    if (A[i + 1] <= A[i]) continue;
    int s = c / A[i];
    c %= A[i];
    c += s * A[i + 1];
  }
  cout << c;
  return 0;
}
