#include <bits/stdc++.h>
void BubbleSort(int *BS, int idx2) {
  int i = 1, j = 0, k = 0;
  int tmp;
  for (i = 1; i < idx2; i++) {
    for (j = 0; j < idx2 - i; j++) {
      if (*(BS + j) > *(BS + (j + 1))) {
        tmp = *(BS + j);
        *(BS + j) = *(BS + (j + 1));
        *(BS + (j + 1)) = tmp;
      }
    }
  }
}
int main() {
  int n;
  int list[100] = {0}, a[100] = {0};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &list[i]);
  }
  BubbleSort(list, n);
  int pen = 0, temp = 0;
  for (int i = 0; i < n; i++) {
    temp = temp + list[i];
    if (temp > 710) break;
    if (temp > 350) {
      a[i] = 1;
      pen = pen + temp - 350;
    }
    if (temp <= 350) {
      a[i] = 1;
    }
  }
  int count = 0;
  for (int j = 0; j < n; j++) {
    if (a[j] == 1) count++;
  }
  printf("%d %d", count, pen);
}
