#include <bits/stdc++.h>
using namespace std;
int n;
int arr[105];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int num = 0;
  int ans = 0;
  int sh = 0;
  for (int i = 0; i < n; i++) {
    num += arr[i];
    if (num <= 350)
      ans++;
    else if (num <= 710) {
      ans++;
      sh += num - 350;
    } else
      break;
  }
  cout << ans << " " << sh << endl;
  return 0;
}
