#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct edge {
  int to, id;
};
using graph = vector<vector<ll>>;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); i++) {
    int temp;
    cin >> temp;
    a[i] = temp;
  }
  ll ans;
  ans = 1000;
  ll kosuu = 0;
  for (int i = 0; i < n; i++) {
    if (-a[i] * (ans / a[i]) + (ans / a[i]) * a[i + 1] > 0) {
      ans = ans - a[i] * (ans / a[i]) + (ans / a[i]) * a[i + 1];
      i++;
    }
  }
  cout << ans << endl;
}
