#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16777216")
int arr[100];
int n;
bool ok(int m) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (i < m)
      sum += 5;
    else
      sum += arr[i];
  }
  return fabs(round(1.0 * sum / n) - 5) <= 1e-6;
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int l = -1, r = n;
  while (r - l > 1) {
    int m = (l + r) / 2;
    if (!ok(m))
      l = m;
    else
      r = m;
  }
  cout << r;
  return 0;
}
