codeparrot/codecomplex huggingface dataset:
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
// No sorceries shall previal. //
         
import java.util.Scanner; 
import java.io.PrintWriter;
import java.util.*;
import java.util.Arrays;
     
public class InVoker {
  
   public static void main(String args[]) {
    		
    	Scanner inp = new Scanner(System.in);
    	PrintWriter out= new PrintWriter(System.out);
    	
    	int n=inp.nextInt();
    	int a[]=new int[n];
    	for(int i=0;i<n;i++)
    		a[i]=inp.nextInt();
    	Arrays.sort(a);
    	int gg=0;
    	for(int i=0;i<n;i++) {
    		if(a[i]==0)
    			continue;
    		gg++;
    		for(int j=i+1;j<n;j++) {
    			if(a[j]%a[i]==0) {
    				a[j]=0;
    			}
    		}
    	}
    	out.println(gg);
    	out.close();
    	inp.close();
    				
    }
    		
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import javax.print.DocFlavor;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Round584_a {
        public static void main(String[] args) throws Exception {
                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                StringTokenizer st;

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

                Arrays.sort(a);

                boolean vis[] = new boolean[n];
                int count = 0;
                for(int i=0 ; i<n ; i++) {
                        if(!vis[i]) {
                                for(int j=i ; j<n ; j++) {
                                        if(!vis[j]) {
                                                if(a[j]%a[i] == 0) {
                                                        vis[j] = true;
                                                }
                                        }
                                }
                                count++;
                        }
                }

                System.out.println(count);
        }
}

/*import java.io.BufferedReader;
        import java.io.InputStreamReader;
        import java.util.StringTokenizer;

public class Round584_a {
        public static void main(String[] args) throws Exception {
                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                StringTokenizer st;
        }
}*/
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        Arrays.sort(a);

        Set<Integer> div = new HashSet<>();
        boolean[] d = new boolean[n];
        for (int i = 0; i < n; i++) {
            for (int j = 0 ; j < n; j++) {
                if (d[j]) {
                    continue;
                }
                if (a[j]%a[i] == 0) {
                    d[j] = true;
                    div.add(a[i]);
                }
            }
        }

        System.out.println(div.size());
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class A {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int n = in.nextInt();
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        Arrays.sort(a);
        int vis[] = new int[n];
        Arrays.fill(vis, -1);
        int c = 0;
        for (int i = 0; i < n; i++) {
            if (vis[i] != -1) continue;
            c++;
            for (int j = i; j < n; j++) {
                if (vis[j] == -1 && a[j] % a[i] == 0) {
                    vis[j] = c;
                }
            }
        }
        
        pw.println(c);

        pw.close();
    }

    static void debug(Object... obj) {
        System.err.println(Arrays.deepToString(obj));
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {

    public static void main(String args[]) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        IntStream.range(0, 1).forEach(tc -> {
            new Solver(tc, in, out).solve();
            out.flush();
        });
        out.close();
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    InputReader(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
    }

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

        return tokenizer.nextToken();
    }

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

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

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

class Solver {
    private InputReader in;
    private PrintWriter out;
    private Integer tc;

    Solver(Integer tc, InputReader in, PrintWriter out) {
        this.in = in;
        this.out = out;
        this.tc = tc;
    }

    void solve() {
        Integer n = in.nextInt();
        TreeSet<Integer> list = IntStream.range(0, n)
                .map(i -> in.nextInt())
                .boxed()
                .collect(Collectors.toCollection(TreeSet::new));

        Integer answer = 0;
        while (!list.isEmpty()) {
            Integer x = list.pollFirst();
            list = list.stream().filter(y -> y % x != 0).collect(Collectors.toCollection(TreeSet::new));
            answer++;
        }

        out.println(answer);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.StringTokenizer;



public class Tt {

	public static void main(String[] args) throws IOException {
		FastScanner fs=new FastScanner(System.in);
		int j = fs.nextInt();
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=0;i<j;i++) {
			a.add(fs.nextInt());
		}
		Collections.sort(a);
		Collections.reverse(a);
		int c=0;
		while(a.size()!=0) {
			int f=a.get(a.size()-1);
			c+=1;
			for(int q=a.size()-1;q>-1;q--)
			if(a.get(q)%f==0) {
				a.remove(q);
			}
		}
		System.out.println(c);
		}
	static class FastScanner {
	    BufferedReader br;
	    StringTokenizer st;
	    public FastScanner(InputStream i){
	        br = new BufferedReader(new InputStreamReader(i));
	        st = new StringTokenizer("");
	    }
	    public String next() throws IOException{
	        if(st.hasMoreTokens()) return st.nextToken();
	        else st = new StringTokenizer(br.readLine());
	        return next();
	    }
	    public long nextLong() throws IOException{ return Long.parseLong(next()); }
	    public int nextInt() throws IOException { return Integer.parseInt(next()); }
	    public double nextDouble() throws IOException { return Double.parseDouble(next()); }
	    public String nextLine() throws IOException {
	        if(!st.hasMoreTokens()) 
	            return br.readLine();
	        String ret = st.nextToken();
	        while(st.hasMoreTokens()) 
	            ret += " " + st.nextToken();
	        return ret;
	    }
	}}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
//package round584;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

public class A {
	InputStream is;
	PrintWriter out;
	String INPUT = "";
	
	void solve()
	{
		int n = ni();
		int[] a = na(n);
		Arrays.sort(a);
		boolean[] done = new boolean[n];
		int ans = 0;
		for(int i = 0;i < n;i++){
			if(!done[i]){
				ans++;
				for(int j = i+1;j < n;j++){
					if(a[j] % a[i] == 0){
						done[j] = true;
					}
				}
			}
		}
		out.println(ans);
	}
	
	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	
	public static void main(String[] args) throws Exception { new A().run(); }
	
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	
	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	
	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	
	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}
// 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.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(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, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int[] hash = new int[101];
            boolean[] hash1 = new boolean[101];
            for (int i = 0; i < n; i++) hash[in.scanInt()]++;
            int ans = 0;
            for (int i = 1; i <= 100; i++) {
                if (hash1[i]) continue;
                if (hash[i] == 0) continue;
                for (int j = i; j <= 100; j += i) hash1[j] = true;
                ans++;
            }
            out.println(ans);

        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public int scanInt() {
            int integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

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

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
 
        public static void main(String[] args) {
            Scanner s = new Scanner(System.in);
            int n=s.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
            a[i]=s.nextInt();
            Arrays.sort(a);
            ArrayList<Integer>al=new ArrayList();
            int k=a[0];
            int count=0;
            for(int j=0;j<n;j++)
            {k=a[j];
                if(Collections.frequency(al,a[j])==0)
                {for(int i=0;i<n;i++)
            {if(a[i]%k==0)
            {al.add(a[i]);}}
            count++;}}
            System.out.println(count);}}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;

public class A {
    public static void main(String[] args) {
        FastScanner scanner = new FastScanner();
        PrintWriter out = new PrintWriter(System.out, false);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        
        Arrays.sort(arr);
        int[] cols = new int[n];
        Arrays.fill(cols, -1);
        int ans = 0;
        for(int i = 0; i < n; i++) {
            if (cols[i] == -1) {
                cols[i] = ans++;
                for(int j = i + 1; j < n; j++) {
                    if (arr[j] % arr[i] == 0) cols[j] = cols[i];
                }
            }
        }
        out.println(ans);
        out.flush();
    }
    
    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;
        }
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
//package Round584;

import java.util.Arrays;
import java.util.Scanner;

public class Problem1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		int n = sc.nextInt();
		int a []=new int[n];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}
		Arrays.sort(a);
//		System.out.println(Arrays.toString(a));
		int k=a.length;
		for(int i=a.length-1;i>=0;i--) {
			int A=a[i];
			for (int j=0;j<i;j++) {
				if(A%a[j]==0) {
					k--;
					break;
				}
			}
		}
		System.out.println(k);
		sc.close();
	}

}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class A {

  static int countColors(List<Integer> colors) {
    Collections.sort(colors);
    int k = 0;
    while (!colors.isEmpty()) {
      Integer c = colors.get(0);
      colors.remove(0);
      k++;

      List<Integer> toRemove = new ArrayList<>();
      for (int i = 0; i < colors.size(); i++) {
        if (colors.get(i) % c == 0) toRemove.add(i);
      }

      Collections.reverse(toRemove);
      for (Integer integer : toRemove) {
        colors.remove(integer.intValue());
      }
    }
    return k;
  }

  public static void main(String[] args) {
    try (Scanner scanner = new Scanner(System.in)) {
      int n = scanner.nextInt();
      scanner.nextLine();
      List<Integer> integers = Arrays.stream(scanner.nextLine().split(" ")).map(Integer::parseInt).collect(Collectors.toList());
      System.out.println(countColors(integers));
    }
  }
}
// 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.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[] a = new int[n];
            for (int i = 0; i < n; ++i) a[i] = in.nextInt();
            boolean[] done = new boolean[n];
            int res = 0;
            while (true) {
                int bi = -1;
                for (int i = 0; i < n; ++i)
                    if (!done[i]) {
                        if (bi < 0 || a[i] < a[bi]) bi = i;
                    }
                if (bi < 0) break;
                ++res;
                for (int i = 0; i < n; ++i) if (!done[i] && a[i] % a[bi] == 0) done[i] = true;
            }
            out.println(res);
        }

    }

    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
// Working program using Reader Class 
import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 

public class Main1 
{ 
	static class Reader 
	{ 
		final private int BUFFER_SIZE = 1 << 16; 
		private DataInputStream din; 
		private byte[] buffer; 
		private int bufferPointer, bytesRead; 

		public Reader() 
		{ 
			din = new DataInputStream(System.in); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public Reader(String file_name) throws IOException 
		{ 
			din = new DataInputStream(new FileInputStream(file_name)); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public String readLine() throws IOException 
		{ 
			byte[] buf = new byte[64]; // line length 
			int cnt = 0, c; 
			while ((c = read()) != -1) 
			{ 
				if (c == '\n') 
					break; 
				buf[cnt++] = (byte) c; 
			} 
			return new String(buf, 0, cnt); 
		} 

		public int nextInt() throws IOException 
		{ 
			int ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do
			{ 
				ret = ret * 10 + c - '0'; 
			} while ((c = read()) >= '0' && c <= '9'); 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		public long nextLong() throws IOException 
		{ 
			long ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 
			if (neg) 
				return -ret; 
			return ret; 
		} 

		public double nextDouble() throws IOException 
		{ 
			double ret = 0, div = 1; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 

			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 

			if (c == '.') 
			{ 
				while ((c = read()) >= '0' && c <= '9') 
				{ 
					ret += (c - '0') / (div *= 10); 
				} 
			} 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		private void fillBuffer() throws IOException 
		{ 
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
			if (bytesRead == -1) 
				buffer[0] = -1; 
		} 

		private byte read() throws IOException 
		{ 
			if (bufferPointer == bytesRead) 
				fillBuffer(); 
			return buffer[bufferPointer++]; 
		} 

		public void close() throws IOException 
		{ 
			if (din == null) 
				return; 
			din.close(); 
		} 
	} 

	public static void main(String[] args) throws IOException 
	{ 
		Reader s=new Reader(); 
		int n = s.nextInt(), i, j, ans=0;
		int[] a = new int[101];
		for(i=0;i<n;i++){
			a[s.nextInt()]++;
		}
		for(i=1;i<=100;i++){
			if(a[i]>0){
				ans++;
				for(j=i;j<=100;j++){
					if(j%i==0){
						a[j]=0;
					}
				}
			}
		}
		System.out.println(ans);
	} 
}