#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 95;
const int inf = 999999999;
int a[200];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + n);
  int all = 710;
  int sum = 0;
  int f = 0;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    sum += a[i];
    if (sum > 350 && sum <= all) {
      f += sum - 350;
    }
    if (sum > all) break;
    cnt++;
  }
  cout << cnt << " " << f << endl;
}
