#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int pro[maxn];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int cnt = 0, ans = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", pro + i);
    }
    sort(pro, pro + n);
    int tmp = 10, pt;
    for (int i = 0; i < n; i++) {
      if (tmp + pro[i] <= 360) {
        cnt++;
        tmp += pro[i];
      } else {
        pt = i;
        break;
      }
    }
    for (int i = pt; i < n; i++) {
      if (tmp + pro[i] <= 720) {
        cnt++;
        tmp += pro[i];
        ans += tmp - 360;
      }
    }
    printf("%d %d\n", cnt, ans);
  }
  return 0;
}
