#include <bits/stdc++.h>
using ll = long long;
using namespace std;
void solve() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    a[i] = m;
  }
  int money = 1000;
  for (int j = 0; j < n - 1; j++) {
    if (a[j + 1] > a[j]) {
      int m = j;
      while (m < n - 2) {
        m++;
        if (a[m + 1] >= a[m]) {
          if (m == n - 2) {
            m = n - 1;
            break;
          }
        } else {
          break;
        }
      }
      money += (a[m] - a[j]) * (money / a[j]);
      if (m == n - 1) {
        break;
      }
      j = m;
      if (j == n - 2) {
        money += (a[j + 1] - a[j]) * (money / a[j]);
      }
    } else {
      continue;
    }
  }
  cout << money << endl;
  ;
  return 0;
}
