#include <bits/stdc++.h>
using namespace std;
int n, k = 1, a[100], maxx[100];
vector<int> v[100];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  k = n;
  for (int i = 1; i < k; ++i) {
    for (int j = i + 1; j <= k; ++j) {
      if (a[j] > a[i]) {
        v[j].push_back(i);
      }
    }
  }
  maxx[1] = 1000;
  for (int i = 2; i <= k; ++i) {
    maxx[i] = maxx[i - 1];
    for (int j = 0; j < v[i].size(); ++j) {
      int t = a[i] - a[v[i][j]], g = maxx[v[i][j]] / a[v[i][j]];
      if (maxx[i] < maxx[v[i][j]] + g * t) {
        maxx[i] = maxx[v[i][j]] + g * t;
      }
    }
  }
  printf("%d\n", maxx[k]);
  return 0;
}
