import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String s = br.readLine(); br.close(); int[] cnt = new int[10]; for (int i = 0; i < n; i++) { cnt[s.charAt(i) - '0']++; } int ans = 0; ans += cnt[3]; ans += cnt[5]; ans += cnt[7]; ans += cnt[1] / 2; if (cnt[1] % 2 == 1 && cnt[9] > 0) { ans++; } System.out.println(ans); } }