import java.util.*;
public class xiaowuc1 {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    boolean odd = false, five = false;
    for(int i = 0; i < n; i++) {
      int x = sc.nextInt();
      if(x%2 == 1) odd = true;
      if(x%5 != 0) five = true;
    }
    if(!odd || !five) System.out.println(n);
    else System.out.println(1);
  }
}
