#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7LL;
const int INF = 2e9;
int N, A[81];
int main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(0),
      cout << fixed << setprecision(20);
  ;
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> A[i];
  int lower = A[0];
  int higher = A[0];
  int cnt = 0;
  vector<pair<int, int> > V;
  for (int i = 0; i < N; ++i) {
    if (i == 0) continue;
    if (A[i] < higher) {
      V.push_back(pair<int, int>(lower, higher));
      lower = A[i];
      higher = A[i];
    } else {
      higher = A[i];
    }
  }
  V.push_back(pair<int, int>(lower, higher));
  int ans = 1000;
  for (auto p : V) {
    int lower = p.first;
    int higher = p.second;
    ans = (ans / lower) * higher + ans % lower;
  }
  cout << ans << "\n";
  return 0;
}
