#include <bits/stdc++.h>
using namespace std;
int n, a[110];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  int s = 0, c = 0;
  for (int i = 0; i < n; ++i) {
    if (s + a[i] > 710) break;
    s += a[i], ++c;
  }
  printf("%d ", c);
  int out = 0;
  while (s > 350) {
    out += s - 350;
    s -= a[c - 1];
    --c;
  }
  printf("%d\n", out);
}
