#include <bits/stdc++.h>
using namespace std;
int seq[100];
int main() {
  int n;
  int acc, t, pen;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", seq + i);
  }
  sort(seq, seq + n);
  acc = 10;
  t = 0;
  pen = 0;
  for (int i = 0; i < n; i++) {
    acc += seq[i];
    if (acc > 720) {
      break;
    }
    t++;
    if (acc > 360) {
      pen += ((acc - 360) < 0 ? -(acc - 360) : (acc - 360));
    }
  }
  printf("%d %d\n", t, pen);
  return 0;
}
