#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e18 + 7;
const int mod = 998244353;
using namespace std;
inline long long int max(long long int a, long long int b) {
  return a > b ? a : b;
}
inline long long int min(long long int a, long long int b) {
  return a < b ? a : b;
}
const int maxn = 105;
int num[maxn];
int book[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> num[i];
      book[i] = 0;
    }
    num[0] = num[1] + 1;
    num[n + 1] = num[n] - 1;
    book[0] = 0;
    book[n + 1] = 0;
    for (int i = 1; i <= n; i++) {
      if (num[i] >= num[i - 1] && num[i] > num[i + 1]) {
        book[i] = 2;
      } else if (num[i] <= num[i - 1] && num[i] < num[i + 1]) {
        book[i] = 1;
      }
    }
    int now = 1000;
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (book[i] == 1) {
        int to = now / num[i];
        cnt += to;
        now -= to * num[i];
      } else if (book[i] == 2) {
        now += cnt * num[i];
        cnt = 0;
      }
    }
    cout << now << endl;
  }
  return 0;
}
