codeparrot/codecomplex huggingface dataset:
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author beginner1010
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            TreeSet<Integer> set = new TreeSet<>();
            int n = in.nextInt();
            for (int i = 0; i < n; i++) {
                int x = in.nextInt();
                set.add(x);
            }
            int ans = 0;
            while (!set.isEmpty()) {
                ans++;
                int minimal = set.first();
                int cur = minimal;
                while (cur <= 100) {
                    set.remove(cur);
                    cur += minimal;
                }
            }
            out.println(ans);
        }

    }

    static class InputReader {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputStream stream;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isWhitespace(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isWhitespace(c));
            return res * sgn;
        }

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;
import java.lang.*;
import java.math.*;

public class A {
	public void run() throws Exception {
		FastScanner sc = new FastScanner();
		
		int n = sc.nextInt();
		int[] arr = new int[n];
		int[] color = new int[n];
		for (int i = 0; i<n; i++) {
			arr[i]  =sc.nextInt();
		}
		Arrays.sort(arr);
		int counter = 1;
		for (int i = 0; i<n; i++) {
			if (color[i]!= 0) continue;
			for (int j = i;j<n; j++) {
				if (color[j]!= 0) continue;
				else if (arr[j]%arr[i] == 0) color[j] = counter;
			}
			counter++;
		}
	//	System.out.println(Arrays.toString(color));
		int max = 0;
		for (int i = 0; i<n; i++) {
			max = Math.max(max, color[i]);
		}
		System.out.println(max);
	}
	static class FastScanner {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public FastScanner() {
			reader = new BufferedReader(new InputStreamReader(System.in), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}

	}
	public static void main (String[] args) throws Exception {
		new A().run();
	}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		int n=s.nextInt();
		
		int[] arr=new int[n];
		
		for(int i=0;i<n;i++)
		{
			arr[i]=s.nextInt();
		}
		
		Arrays.sort(arr);
		
		int[] visited=new int[n];
		
		int ans=0;
		
		for(int i=0;i<n;i++)
		{
			if(visited[i]==0)
			{	
				ans++;
				
				for(int j=i+1;j<n;j++)
				{
					if(arr[j]%arr[i]==0&&visited[j]==0)
					{
						visited[j]=1;
					}
				}
			}
		}
		
		System.out.println(ans);
		
	}
	
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class PaintColor {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String input[] = br.readLine().split(" ");
        int c = 0;
        Set<Integer> s = new HashSet<>();
        int arr[] = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(input[i]);
        }
        Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            if (!s.contains(arr[i])) {
                c++;
                for (int j = i; j < n; j++) {
                    if (arr[j] % arr[i] == 0) {
                        s.add(arr[j]);
                    }
                }
            }
        }
        System.out.println(c);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] ar = new int[n];
            for (int i = 0; i < n; i++)
                ar[i] = in.nextInt();
            Arrays.sort(ar);
            boolean[] u = new boolean[n];
            int ans = 0;
            for (int i = 0; i < n; i++) {
                if (!u[i]) {
                    u[i] = true;
                    ans++;
                    for (int j = 0; j < n; j++) {
                        if (!u[j] && ar[j] % ar[i] == 0) {
                            u[j] = true;
                        }
                    }
                }
            }
            out.println(ans);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;
 
public class Main{
	
	public static void main (String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt(), min[] = new int[n];
		boolean used[] = new boolean[n];
		HashSet<Integer> set = new HashSet<>();
		
		
		for (int i = 0; i < n; i++) {
			min[i] = scan.nextInt();
		}
		
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
					if (min[i] > min[j]) {
						if (min[i] % min[j] == 0)
							min[i] = min[j];
					}
					else if (min[j] % min[i] == 0)
							min[j] = min[i];
				}
		}
		
		for (int i = 0; i < n; i++) {
			set.add(min[i]);
		}
		
		System.out.print(set.size());
	}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;


public class Main {
    static int inf = (int) 1e9 + 7;

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(System.out);
        int n = nextInt();
        int a[] = new int [n];
        for(int i = 0;i < n;i++) a[i] = nextInt();
        int ans = 0;
        boolean b[] = new boolean[n];
        Arrays.sort(a);

        for(int i = 0;i < n;i++) {
            if (!b[i]) {
                for(int j = i;j < n;j++) {
                    if (a[j] % a[i] == 0) b[j] = true;
                }
                ans++;
            }
        }
        pw.println(ans);
        pw.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");
    static PrintWriter pw;

    static String next() throws IOException {
        while (!st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class A {
    public static void main(String[] args) throws Exception {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        int n = Integer.parseInt(bf.readLine());
        StringTokenizer st = new StringTokenizer(bf.readLine());
        int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());

        int counter = 0;
        TreeSet<Integer> val = new TreeSet<Integer>();
        for(int i : a) val.add(i);
        while(!val.isEmpty()) {
          int min = val.first();
          Set<Integer> toRemove = new HashSet<Integer>();
          for(int i : val) if(i % min == 0) toRemove.add(i);
          for(int i : toRemove) val.remove(i);
          counter++;
        }
        out.println(counter);
        // int n = Integer.parseInt(st.nextToken());

        out.close(); System.exit(0);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Washoum
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        APaintTheNumbers solver = new APaintTheNumbers();
        solver.solve(1, in, out);
        out.close();
    }

    static class APaintTheNumbers {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            int n = sc.nextInt();
            Integer[] tab = new Integer[n];
            for (int i = 0; i < n; i++) {
                tab[i] = sc.nextInt();
            }
            Arrays.sort(tab);
            boolean[] done = new boolean[n];
            int ans = 0;
            for (int i = 0; i < n; i++) {
                if (!done[i]) {
                    ans++;
                    done[i] = true;
                    for (int j = i + 1; j < n; j++) {
                        if (!done[j] && tab[j] % tab[i] == 0) {
                            done[j] = true;
                        }
                    }
                }
            }
            out.println(ans);
        }

    }

    static class inputClass {
        BufferedReader br;
        StringTokenizer st;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Scanner;

public class first {
	static int max = 1000000000;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] tab = new int[n];
		for(int i=0;i<n;i++) {
			tab[i] = sc.nextInt();
		}
		for(int i=0;i<n;i++) {
			for(int j=0;j<n;j++) {
				if(i!=j)
				if(tab[i]>=tab[j] && tab[i]%tab[j]==0) {
					tab[i] = max;
				}
			}
		}
		int res = 0;
		for(int i=0;i<n;i++) {
			if(tab[i]!=max) res++;
		}
		System.out.println(res);
		//System.out.println(4%-1);
	}

}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;

import static java.lang.Math.*;


public class cfs584A {
    static long LINF = Long.MAX_VALUE / 4;
    static long IING = Integer.MAX_VALUE / 4;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        StringBuilder sb = new StringBuilder();
        int N = sc.nextInt();
        int[] nums = sc.readIntArray(N);
        ArrayList<Integer> num = new ArrayList<>();

        for (int i = 0; i < N; i++) {
            num.add(nums[i]);
        }


        int count = 0;
        while (!num.isEmpty()) {
            count++;
            int size = num.size();
            int min = 200;
            for (int j = size-1; j >=0; j--) {
                if (num.get(j) < min) {
                    min = num.get(j);
                }
            }
            for (int j = size-1; j >=0; j--) {
                int div = num.get(j) / min;
                if ((div * min) == num.get(j)) {
                    num.remove(j);
                }
            }
        }
        sb.append(count);

        System.out.print(sb);
    }

    static void Assert(boolean b) {
        if (!b) throw new Error("Assertion Failed");
    }

    static class Pair implements Comparable<Pair> {
        int x, y;

        Pair(int _x, int _y) {
            x = _x;
            y = _y;
        }

        public int compareTo(Pair o) {
            int c1 = Integer.compare(x, o.x);
            return c1 != 0 ? c1 : Integer.compare(y, o.y);
        }

    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }

        public FastScanner() {
            this(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }

        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        }
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Arrays;
import java.util.Scanner;
 
public class Codeforce {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for(int i=0; i<n; i++) {
			arr[i] = sc.nextInt();
		}
		int color = 0;
		Arrays.sort(arr);
		for(int i=0; i<n; i++) {
			if(arr[i]!=0) {
				int col = arr[i];
				color++;
				for(int j=i; j<n; j++) {
					if(arr[j]%col==0) arr[j]=0;
				}
			}
		}
		System.out.println(color);
		sc.close();
	}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
			import java.io.*;
			import java.util.*;
			 
			public class oK{
					    void pre() throws Exception{}
					    void solve(int TC) throws Exception{
					    int n=ni();
					    	int a[]=new int[n];
					    for(int i=0;i<n;i++) {
					    	a[i]=ni();
					    }
					    Arrays.sort(a);
					    int b[]=new int[101];
					    int flag=0;
					    int count=0;
					    for(int i=0;i<n;i++) {
					    	flag=0;
					    	if(b[a[i]]==0) {
					    		count++;
					    	}
					    	for(int j=i;j<n;j++) {
					    		if(b[a[j]]==0&&a[j]%a[i]==0) {
					    			
					    			b[a[j]]=1;
					    			
					    		}
					    		//if(flag==1)count++;
					    	}
					    	
					    	
					    }
					    pn(count);
					    
					    
					    }
					    		
					    		
					    
					    
					    
					    
					    
					   // void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
					    static boolean multipleTC = false, memory = false;
					    FastReader in;PrintWriter out;
					    void run() throws Exception{
					        in = new FastReader();
					        out = new PrintWriter(System.out);
					        int T = (multipleTC)?ni():1;
					        pre();for(int t = 1; t<= T; t++)solve(t);
					        out.flush();
					        out.close();
					    }
					    public static void main(String[] args) throws Exception{
					        if(memory)new Thread(null, new Runnable() {public void run(){try{new oK().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
					        else new oK().run();
					    }
					    void p(Object o){out.print(o);}
					    void pn(Object o){out.println(o);}
					    void pni(Object o){out.println(o);out.flush();}
					    String n()throws Exception{return in.next();}
					    String nln()throws Exception{return in.nextLine();}
					    int ni()throws Exception{return Integer.parseInt(in.next());}
					    long nl()throws Exception{return Long.parseLong(in.next());}
					
					    class FastReader{
					        BufferedReader br;
					        StringTokenizer st;
					        public FastReader(){
					            br = new BufferedReader(new InputStreamReader(System.in));
					        }
					
					        public FastReader(String s) throws Exception{
					            br = new BufferedReader(new FileReader(s));
					        }
					
					        String next() throws Exception{
					            while (st == null || !st.hasMoreElements()){
					                try{
					                    st = new StringTokenizer(br.readLine());
					                }catch (IOException  e){
					                    throw new Exception(e.toString());
					                }
					            }
					            return st.nextToken();
					        }
					
					        String nextLine() throws Exception{
					            String str = "";
					            try{   
					                str = br.readLine();
					            }catch (IOException e){
					                throw new Exception(e.toString());
					            }  
					            return str;
					        }
					    }
					}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.awt.*;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;
import java.io.*;
public class Main3 {
    static PrintWriter pr;
    static Scanner scan;
    static BufferedReader br;
    static StringTokenizer st;
    public static void main(String args[]) throws Exception {
        pr = new PrintWriter(System.out);
        scan = new Scanner(System.in);
        br = new BufferedReader(new InputStreamReader(System.in));
        int n = inputInt();
        //char[] c = br.readLine().toCharArray();
        int[] a = new int[n];
        int[] b = new int[n];
        st = new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++){

            a[i]=Integer.parseInt(st.nextToken());
            //b[i]=Integer.parseInt(st.nextToken());
        }
        Arrays.sort(a);
        int ans=0;
        for(int i=0;i<n;i++){
            if(b[i]!=1){
                ans++;
                for(int j=i;j<n;j++){
                    if(a[j]%a[i]==0){
                        b[j]=1;
                    }
                }
            }
        }
        System.out.println(ans);
    }


    public static int inputInt() throws IOException{
        return Integer.parseInt(br.readLine());
    }

    public static long inputLong() throws IOException{
        return Long.parseLong(br.readLine());
    }

    public static String inputString() throws IOException{
        return br.readLine();
    }

    public static  int[] intArray(int n) throws IOException{
        int a[] = new int[n];
        st = new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(st.nextToken());
        }
        return a;
    }

    public static  long[] longArray(int n) throws IOException{
        long a[] = new long[n];
        st = new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++){
            a[i] = Long.parseLong(st.nextToken());
        }
        return a;
    }

    public static String[] stringArray(int n) throws IOException{
        String a[] = new String[n];
        st = new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++){
            a[i] = st.nextToken();
        }
        return a;
    }

    public static long gcd(long a,long b){
        if(b==0){
            return a;
        }
        else{
            return gcd(b,a%b);
        }
    }

    public long max(long a,long b,long c){
        return Math.max(a,Math.max(b,c));
    }
}