#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; ++i) cin >> A[i];
  int ans = 1000, tmp = 0;
  int f = 0;
  for (int i = 0; i < n - 1; ++i) {
    int j;
    f = 0;
    for (j = i + 1; j < n; ++j) {
      if (A[i] < A[j]) {
        f = 1;
        break;
      }
    }
    if (f) {
      tmp = ans / A[i];
      ans %= A[i];
      int a = A[i];
      int k;
      for (k = i; k < j; ++k) {
        if (a > A[k]) a = A[k];
      }
      ans += tmp * A[i];
      tmp = ans / a;
      ans %= a;
      ans += tmp * A[j];
      i = j - 1;
    }
  }
  cout << ans << endl;
}
