#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mp[a[i]]++;
  }
  long long int my = 1000, kabu = 0;
  for (int i = 0; i < n; ++i) {
    int p = 0;
    if (a[i] < a[i + 1]) {
      p = my / a[i];
    }
    my += (a[i + 1] - a[i]) * p;
  }
  cout << my << endl;
  return 0;
}
