#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, x, dp[N], a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    dp[i + 1] =
        min(dp[i] + 20,
            min(dp[upper_bound(a + 1, a + i + 1, a[i] - 90) - a] + 50,
                dp[upper_bound(a + 1, a + i + 1, a[i] - 1440) - a] + 120));
    cout << dp[i + 1] - dp[i] << "\n";
  }
}
