#include <bits/stdc++.h>
using namespace std;
int n;
int a[100];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int currT = -350;
  int ans = 0;
  int pen = 0;
  for (int i = 0; i < n; i++) {
    currT += a[i];
    if (currT > 360) break;
    ans++;
    pen += currT <= 0 ? 0 : currT;
  }
  cout << ans << " " << pen;
  return 0;
}
