#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int n;
int a[110];
int main() {
  cin >> n;
  for (long long i = 0; i < (n); i++) {
    cin >> a[i];
  }
  int now = 1000, stock = 0;
  for (long long i = 0; i < (n); i++) {
    now += stock * a[i];
    if (a[i] < a[i + 1]) {
      stock = now / a[i];
      now %= a[i];
    } else {
      stock = 0;
    }
  }
  cout << now;
  return 0;
}
