#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  int ans = 0;
  int t1 = 0;
  while ((t1 <= 350) && (ans < n)) {
    if (t1 + a[ans] <= 350) {
      t1 += a[ans];
      ans++;
    } else {
      a[ans] -= 350 - t1;
      break;
    }
  }
  int t2 = 0;
  t1 = 360;
  while ((t1 <= 720) && (ans < n)) {
    if (t1 + a[ans] <= 720) {
      t1 += a[ans];
      ans++;
      t2 += t1 - 360;
    } else
      break;
  }
  cout << ans;
  cout << ' ';
  cout << t2;
}
