#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int N = 105;
int n, a[N];
int main() {
  int i, j, k, t, nc = 0;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; ++i) {
      scanf("%d", &a[i]);
    }
    sort(a, a + n);
    int cnt = 0, sum = 0, ans = 0;
    for (i = 0; i < n; ++i) {
      if (sum + a[i] > 710) break;
      sum += a[i];
      if (sum > 350) {
        ans += sum - 350;
      }
      cnt++;
    }
    printf("%d %d\n", cnt, ans);
  }
  return 0;
}
