#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int s[N];
  for (int i = 0; i < N; ++i) cin >> s[i];
  int Money = 1000;
  int stock = 0;
  for (int i = 0; i < N; ++i) {
    if (i == 0) {
      if (s[i] < s[i + 1]) {
        stock = Money / s[i];
        Money %= s[i];
      }
    } else if (i == N - 1) {
      if (s[i - 1] <= s[i]) {
        Money += stock * s[i];
        stock = 0;
      }
    } else {
      if (s[i] >= s[i - 1] && s[i] > s[i + 1]) {
        Money += stock * s[i];
        stock = 0;
      } else if (s[i] <= s[i - 1] && s[i] < s[i + 1]) {
        stock = Money / s[i];
        Money %= s[i];
      }
    }
  }
  cout << Money << endl;
  return 0;
}
