#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n + 3);
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  int mx = 0, mn = 222;
  int have = 1000;
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n + 1; ++j) {
      if (a[j] <= a[j - 1]) {
        int cnt = have / a[i];
        have -= cnt * a[i];
        have += cnt * a[j - 1];
        i = j - 1;
        break;
      }
    }
  }
  cout << have;
}
