#include <bits/stdc++.h>
using namespace std;
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, -1, 0, 1};
int a[100];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  std::sort(a, a + n);
  int solved = 0;
  int pena = 0;
  int sum = 10;
  ;
  for (int i = 0; i < n; i++) {
    sum += a[i];
    if (sum > 720) break;
    solved++;
    if (sum <= 360) {
      pena += 0;
    } else {
      pena += sum - 360;
    }
  }
  cout << solved << " " << pena << endl;
  return 0;
}
