#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vecint = vector<int>;
using vecll = vector<ll>;
using vec2int = vector<vector<int>>;
using P = pair<int, int>;
void chmax(int& a, int b) {
  if (a < b) a = b;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vecint a;
  int t = 0;
  for (int i = 0; i < (int)n; i++) {
    int tmp;
    cin >> tmp;
    if (t != tmp) {
      a.push_back(tmp);
      t = tmp;
    }
  }
  int x = 0;
  int y = 1000;
  int m = a.size();
  for (int i = 0; i < (int)m - 1; i++) {
    if (a[i] < a[i + 1]) {
      int k = y / a[i];
      x += k;
      y -= a[i] * k;
      x = 0;
      y += a[i + 1] * k;
    } else {
    }
  }
  cout << y << endl;
}
