#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e2 + 7;
int n;
int a[N], pref[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + n + 1);
  pref[0] = 10;
  for (int i = 1; i <= n; i++) {
    pref[i] = pref[i - 1] + a[i];
  }
  pair<int, int> ans = {0, 0};
  for (int i = 1; i <= n; i++) {
    if (pref[i] > 720) {
      break;
    }
    ans.first = i;
    ans.second += max(0, pref[i] - 360);
  }
  cout << ans.first << ' ' << ans.second;
}
