import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;

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

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int[] a = in.readIntArray(n);
            ArrayUtils.sort(a);
            boolean[] done = new boolean[n];
            int answer = 0;
            for (int i = 0; i < n; i++) {
                if (done[i]) {
                    continue;
                }
                answer++;
                for (int j = i; j < n; j++) {
                    if (a[j] % a[i] == 0) {
                        done[j] = true;
                    }
                }
            }
            out.printLine(answer);
        }

    }

    static class Sorter {
        private static final int INSERTION_THRESHOLD = 16;

        private Sorter() {
        }

        public static void sort(IntList list, IntComparator comparator) {
            quickSort(list, 0, list.size() - 1, (Integer.bitCount(Integer.highestOneBit(list.size()) - 1) * 5) >> 1,
                    comparator);
        }

        private static void quickSort(IntList list, int from, int to, int remaining, IntComparator comparator) {
            if (to - from < INSERTION_THRESHOLD) {
                insertionSort(list, from, to, comparator);
                return;
            }
            if (remaining == 0) {
                heapSort(list, from, to, comparator);
                return;
            }
            remaining--;
            int pivotIndex = (from + to) >> 1;
            int pivot = list.get(pivotIndex);
            list.swap(pivotIndex, to);
            int storeIndex = from;
            int equalIndex = to;
            for (int i = from; i < equalIndex; i++) {
                int value = comparator.compare(list.get(i), pivot);
                if (value < 0) {
                    list.swap(storeIndex++, i);
                } else if (value == 0) {
                    list.swap(--equalIndex, i--);
                }
            }
            quickSort(list, from, storeIndex - 1, remaining, comparator);
            for (int i = equalIndex; i <= to; i++) {
                list.swap(storeIndex++, i);
            }
            quickSort(list, storeIndex, to, remaining, comparator);
        }

        private static void heapSort(IntList list, int from, int to, IntComparator comparator) {
            for (int i = (to + from - 1) >> 1; i >= from; i--) {
                siftDown(list, i, to, comparator, from);
            }
            for (int i = to; i > from; i--) {
                list.swap(from, i);
                siftDown(list, from, i - 1, comparator, from);
            }
        }

        private static void siftDown(IntList list, int start, int end, IntComparator comparator, int delta) {
            int value = list.get(start);
            while (true) {
                int child = ((start - delta) << 1) + 1 + delta;
                if (child > end) {
                    return;
                }
                int childValue = list.get(child);
                if (child + 1 <= end) {
                    int otherValue = list.get(child + 1);
                    if (comparator.compare(otherValue, childValue) > 0) {
                        child++;
                        childValue = otherValue;
                    }
                }
                if (comparator.compare(value, childValue) >= 0) {
                    return;
                }
                list.swap(start, child);
                start = child;
            }
        }

        private static void insertionSort(IntList list, int from, int to, IntComparator comparator) {
            for (int i = from + 1; i <= to; i++) {
                int value = list.get(i);
                for (int j = i - 1; j >= from; j--) {
                    if (comparator.compare(list.get(j), value) <= 0) {
                        break;
                    }
                    list.swap(j, j + 1);
                }
            }
        }

    }

    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();

        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }

        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }

    }

    static interface IntComparator {
        public static final IntComparator DEFAULT = (first, second) -> {
            if (first < second) {
                return -1;
            }
            if (first > second) {
                return 1;
            }
            return 0;
        };

        public int compare(int first, int second);

    }

    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void addAt(int index, int value) {
            throw new UnsupportedOperationException();
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }

        public void set(int index, int value) {
            data[index] = value;
        }

    }

    static interface IntIterator {
        public int value() throws NoSuchElementException;

        public boolean advance();

        public boolean isValid();

    }

    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }

    }

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

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

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = readInt();
            }
            return array;
        }

        public 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 readInt() {
            int c = read();
            while (isSpaceChar(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 (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

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

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static interface IntCollection extends IntStream {
        public int size();

        default public void add(int value) {
            throw new UnsupportedOperationException();
        }

        default public IntCollection addAll(IntStream values) {
            for (IntIterator it = values.intIterator(); it.isValid(); it.advance()) {
                add(it.value());
            }
            return this;
        }

    }

    static interface IntReversableCollection extends IntCollection {
    }

    static class IntArrayList extends IntAbstractStream implements IntList {
        private int size;
        private int[] data;

        public IntArrayList() {
            this(3);
        }

        public IntArrayList(int capacity) {
            data = new int[capacity];
        }

        public IntArrayList(IntCollection c) {
            this(c.size());
            addAll(c);
        }

        public IntArrayList(IntStream c) {
            this();
            if (c instanceof IntCollection) {
                ensureCapacity(((IntCollection) c).size());
            }
            addAll(c);
        }

        public IntArrayList(IntArrayList c) {
            size = c.size();
            data = c.data.clone();
        }

        public IntArrayList(int[] arr) {
            size = arr.length;
            data = arr.clone();
        }

        public int size() {
            return size;
        }

        public int get(int at) {
            if (at >= size) {
                throw new IndexOutOfBoundsException("at = " + at + ", size = " + size);
            }
            return data[at];
        }

        private void ensureCapacity(int capacity) {
            if (data.length >= capacity) {
                return;
            }
            capacity = Math.max(2 * data.length, capacity);
            data = Arrays.copyOf(data, capacity);
        }

        public void addAt(int index, int value) {
            ensureCapacity(size + 1);
            if (index > size || index < 0) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            if (index != size) {
                System.arraycopy(data, index, data, index + 1, size - index);
            }
            data[index] = value;
            size++;
        }

        public void removeAt(int index) {
            if (index >= size || index < 0) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            if (index != size - 1) {
                System.arraycopy(data, index + 1, data, index, size - index - 1);
            }
            size--;
        }

        public void set(int index, int value) {
            if (index >= size) {
                throw new IndexOutOfBoundsException("at = " + index + ", size = " + size);
            }
            data[index] = value;
        }

    }

    static class ArrayUtils {
        public static int[] sort(int[] array) {
            return sort(array, IntComparator.DEFAULT);
        }

        public static int[] sort(int[] array, IntComparator comparator) {
            return sort(array, 0, array.length, comparator);
        }

        public static int[] sort(int[] array, int from, int to, IntComparator comparator) {
            if (from == 0 && to == array.length) {
                new IntArray(array).sort(comparator);
            } else {
                new IntArray(array).subList(from, to).sort(comparator);
            }
            return array;
        }

    }

    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);

        public abstract void set(int index, int value);

        public abstract void addAt(int index, int value);

        public abstract void removeAt(int index);

        default public void swap(int first, int second) {
            if (first == second) {
                return;
            }
            int temp = get(first);
            set(first, get(second));
            set(second, temp);
        }

        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }

        default public void add(int value) {
            addAt(size(), value);
        }

        default public IntList sort(IntComparator comparator) {
            Sorter.sort(this, comparator);
            return this;
        }

        default public IntList subList(final int from, final int to) {
            return new IntList() {
                private final int shift;
                private final int size;

                {
                    if (from < 0 || from > to || to > IntList.this.size()) {
                        throw new IndexOutOfBoundsException("from = " + from + ", to = " + to + ", size = " + size());
                    }
                    shift = from;
                    size = to - from;
                }

                public int size() {
                    return size;
                }

                public int get(int at) {
                    if (at < 0 || at >= size) {
                        throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
                    }
                    return IntList.this.get(at + shift);
                }

                public void addAt(int index, int value) {
                    throw new UnsupportedOperationException();
                }

                public void removeAt(int index) {
                    throw new UnsupportedOperationException();
                }

                public void set(int at, int value) {
                    if (at < 0 || at >= size) {
                        throw new IndexOutOfBoundsException("at = " + at + ", size = " + size());
                    }
                    IntList.this.set(at + shift, value);
                }

                public IntList compute() {
                    return new IntArrayList(this);
                }
            };
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }
}


import java.util.*;

public class PaintTheNumers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int nums = sc.nextInt();

        HashSet<Integer> elements = new HashSet<Integer>();
        for (int i = 0; i < nums; i++) {
            elements.add(sc.nextInt());
        }

        ArrayList<Integer> sortedElements = new ArrayList<Integer>(elements);

        Collections.sort(sortedElements);

        ArrayList<Integer> lcms = new ArrayList<Integer>();

        outer:
        for (int i = 0; i < sortedElements.size(); i++) {
            int ele = sortedElements.get(i);
            for (int j = 0; j < lcms.size(); j++) {
                if (ele % lcms.get(j) == 0) {
                    continue outer;
                }
            }
            lcms.add(ele);
        }
        System.out.println(lcms.size());
        sc.close();
    }
}


import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class template {
	public static void main(String[] args) throws Exception {
		FastScanner sc = new FastScanner();
		PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		Integer[] arr = new Integer[n];
		for(int i=0;i<n;i++) {
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		int ct = 0;
		boolean[] ar = new boolean[n];
		for(int i=0;i<n;i++) {
			if(!ar[i]) {
				ar[i]=true;
				ct++;
				int x = arr[i];
				for(int j=0;j<n;j++) {
					if(arr[j]%x==0) {
						ar[j]=true;
					}
				}
			}
		}

		pw.println(ct);
		pw.close();
	}
}
@SuppressWarnings("all")
class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    public FastScanner(BufferedReader d) {
        br=d;
    }
    public FastScanner(String s) {
        try {
            br = new BufferedReader(new FileReader(s));
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public FastScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

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

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

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


import java.io.*;
import java.util.*;

public class Problem_A {

	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		int n = scan.nextInt();
		int[] elements = new int[n];
		for (int i = 0; i < n; i++)
			elements[i] = scan.nextInt();

		int x = 0;

		Arrays.sort(elements);
		while(n > 0) {
			x++;
			int[] temp = new int[n];
			int j = 0;
			int size = n;
			int min = elements[0];
			n--;
			for (int i = 1; i < size; i++) {
				if (elements[i]%min == 0) {
					n--;
				}
				else {
					temp[j++] = elements[i];
				}
			}

			elements = temp;
		}

		out.println(x);
		out.close();
	}

	public static PrintWriter out  = new PrintWriter(new BufferedOutputStream(System.out));
	public static class MyScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		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 nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

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

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int[] a = in.readIntArray(n);

            ArrayUtils.radixSort(a);

            int answer = 0;
            boolean[] used = new boolean[a.length];
            for (int i = 0; i < a.length; ++i) {
                if (used[i]) continue;

                used[i] = true;
                answer++;
                for (int j = i + 1; j < a.length; ++j)
                    if (a[j] % a[i] == 0)
                        used[j] = true;
            }

            out.println(answer);
        }

    }

    static class ArrayUtils {
        public static void radixSort(int[] array) {
            int[] ordered = new int[array.length];
            {
                int[] freq = new int[0xFFFF + 2];
                for (int i = 0; i < array.length; ++i) freq[(array[i] & 0xFFFF) + 1]++;
                for (int i = 1; i < freq.length; ++i) freq[i] += freq[i - 1];

                for (int i = 0; i < array.length; ++i)
                    ordered[freq[array[i] & 0xFFFF]++] = array[i];
                for (int i = 0; i < array.length; ++i)
                    array[i] = ordered[i];
            }
            {
                int[] freq = new int[0xFFFF + 2];
                for (int i = 0; i < array.length; ++i) freq[(array[i] >>> 16) + 1]++;
                for (int i = 1; i < freq.length; ++i) freq[i] += freq[i - 1];

                for (int i = 0; i < array.length; ++i)
                    ordered[freq[array[i] >>> 16]++] = array[i];

                int indexOfFirstNegative = freq[0x7FFF];
                int index = 0;
                for (int i = indexOfFirstNegative; i < ordered.length; ++i, ++index)
                    array[index] = ordered[i];
                for (int i = 0; i < indexOfFirstNegative; ++i, ++index)
                    array[index] = ordered[i];
            }
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

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

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

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();
            return array;
        }

    }
}


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.FileReader;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
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;
        FastScanner in = new FastScanner(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, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            int[] a = in.nextIntArray(n);
            Arrays.sort(a);
            int count = 0;
            boolean[] used = new boolean[n];
            for (int i = 0; i < n; i++) {
                if (!used[i]) {
                    count++;
                    for (int j = i; j < n; j++) {
                        if (a[j] % a[i] == 0) {
                            used[j] = true;
                        }
                    }
                }
            }
            out.println(count);
        }

    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

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

        public FastScanner(String fileName) {
            try {
                br = new BufferedReader(new FileReader(fileName));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

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

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

        public int[] nextIntArray(int n) {
            int[] ret = new int[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextInt();
            }
            return ret;
        }

    }
}


import java.io.*;
import java.util.*;
//import javafx.util.*;
import java.math.*;
//import java.lang.*;
public class Main
{
  //  static int n;static ArrayList<Integer> arr[];
   // int ans[];

    public static void main(String[] args) throws IOException {
    //    Scanner sc=new Scanner(System.in);
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        br = new BufferedReader(new InputStreamReader(System.in));
        int n=nextInt();
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=nextInt();
        }
        Arrays.sort(arr);
        int c=0;
        for(int i=0;i<n;i++){
            if(arr[i]!=0){
                int a=arr[i];
                c++;
                for(int j=i;j<n;j++){
                  //  System.out.println(arr[i]+" "+arr[j]);
                    if(arr[j]%a==0){
                        arr[j]=0;
                    }
                }
            }
        }
        pw.println(c);
        pw.close();

    }

    static long maxSubArraySum(long a[],int size)
{

    long max_so_far = 0, max_ending_here = 0;

    for (int i = 0; i < size; i++)
    {
        max_ending_here = max_ending_here + a[i];
        if (max_ending_here < 0)
            max_ending_here = 0;

        /* Do not compare for all
           elements. Compare only
           when max_ending_here > 0 */
        else if (max_so_far < max_ending_here)
            max_so_far = max_ending_here;

    }
    return max_so_far;
}
    public static BufferedReader br;
    public static StringTokenizer st;
    public static String next() {
        while (st == null || !st.hasMoreTokens()) {
       try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return st.nextToken();
    }

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

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

    public static Double nextDouble() {
        return Double.parseDouble(next());
    }
    static class Pair{
        int x;int y;int z;
        Pair(int x,int y,int z){
            this.x=x;
            this.y=y;
            this.z=z;
          //  this.i=i;
        }
    }
    static class sorting implements Comparator<Pair>{
        public int compare(Pair a,Pair b){
            //return (a.y)-(b.y);
            return (a.x-b.x);
        }
    }
    public static int[] na(int n)throws IOException{
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = nextInt();
        return a;
    }
    static class query implements Comparable<query>{
        int l,r,idx,block;
        static int len;
        query(int l,int r,int i){
            this.l=l;
            this.r=r;
            this.idx=i;
            this.block=l/len;
        }
        public int compareTo(query a){
            return block==a.block?r-a.r:block-a.block;
        }
    }
    static boolean isPrime(int n) {
        if (n <= 1)
            return false;
        if (n <= 3)
            return true;
        if (n % 2 == 0 ||
            n % 3 == 0)
            return false;

        for (int i = 5;
                 i * i <= n; i = i + 6)
            if (n % i == 0 ||
                n % (i + 2) == 0)
                return false;

        return true;
    }
    static long gcd(long a, long b) {
      if (b == 0)
        return a;
      return gcd(b, a % b);
    }
    static long modInverse(long a, long m) {
        long g = gcd(a, m);
        if (g != 1)
            return -1;
        else{
            // If a and m are relatively prime, then modulo inverse
            // is a^(m-2) mode m
            return (power(a, m - 2, m));
        }
    }

    // To compute x^y under modulo m
    static long power(long x, long y, long m){
        if (y == 0)
            return 1;
        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        if (y % 2 == 0)
            return p;
        else
            return (x * p) % m;
    }
    static long fast_pow(long base,long n,long M){
        if(n==0)
           return 1;
        if(n==1)
        return base;
        long halfn=fast_pow(base,n/2,M);
        if(n%2==0)
            return ( halfn * halfn ) % M;
        else
            return ( ( ( halfn * halfn ) % M ) * base ) % M;
    }
       static long modInverse(long n,int M){
        return fast_pow(n,M-2,M);
    }

}


import java.io.*;
import java.util.*;
import java.math.*;

public class A {
	public static void main(String[] args) throws IOException {

		/**/
		Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		/*/
		Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(new FileInputStream("src/a.in"))));
		/**/

		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		Arrays.sort(a);
		int ans = 0;
		boolean[] v = new boolean[n];
		for (int i = 0; i < n; i++) {
			if (v[i])
				continue;
			v[i] = true;
			ans++;
			for (int j = i; j < n; j++) {
				if (a[j]%a[i]==0)
					v[j] = true;
			}
		}
		System.out.println(ans);
	}
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        Arrays.sort(arr);
        int cnt = 0;
        int pos = 0;
        while (true) {
            while (pos < n && arr[pos] == -1) pos++;
            if (pos == n) break;
            int min = arr[pos];
            arr[pos] = -1;
            cnt++;
            for (int i = pos + 1; i < n; i++) {
                if (arr[i] % min == 0) {
                    arr[i] = -1;
                }
            }
        }
        System.out.println(cnt);
    }
}


import java.util.*;
public class paintTheNumbers {
    public static void main (String [] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int [] arr = new int[n];
        for(int i = 0; i < n; i++){
            arr[i] = scanner.nextInt();
        }
        System.out.print(paint(arr));
    }
    public static int paint(int [] arr){
        Arrays.sort(arr);
        HashSet<Integer> set = new HashSet<>();
        int num = arr[0];
        set.add(num);
        for(int i = 1; i < arr.length; i++){
            if(!divBySet(set, arr[i])){
                set.add(arr[i]);
            }

        }
        return set.size();
    }

    /**
     *
     * @param set
     * @param a
     * @return
     */
    public static boolean divBySet(HashSet<Integer> set, int a){
        for(int s: set){
            if(a % s == 0){
                return true;
            }
        }
        return false;
    }

}


import java.util.*;

public final class paint_and_numers {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        for(int i=0;i<n;i++) a[i] = in.nextInt();
        Arrays.sort(a);
        int count = 0;
        boolean[] c = new boolean[n];
        for(int i=0;i<n;i++) {
            if(c[i]==false) {
                c[i]=true;
                count++;
                for(int j=i+1;j<n;j++) {
                    if(a[j]%a[i]==0) {
                        c[j] = true;
                    }
                }
            }
        }
        System.out.println(count);
    }
}


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;
        }

    }
}


import java.io.*;
import java.util.*;
import java.util.Map.*;
import java.math.*;
//import java.lang.*;

public class q1
{
    static int MOD=1000000007;
    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[1000000]; // 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();
        }
    }

    static boolean isPrime(int n)
    {
        if (n <= 1)
            return false;
        if (n <= 3)
            return true;
        if (n % 2 == 0 || n % 3 == 0)
            return false;

        for (int i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 ||  n % (i + 2) == 0)
                return false;

        return true;
    }
    static int gcd(int a, int b)
    {
      if (b == 0)
        return a;
      return gcd(b, a % b);
    }
    //Functions

    public static void main(String[] args) throws IOException
    {
       Scanner sc=new Scanner(System.in);
       //int T=sc.nextInt();
       int T=1;
       while(T-- > 0){
           int N=sc.nextInt();
           int a[]=new int[N];
           int count=0;
           int ans=0;
           boolean flag=false;

           for(int i=0;i<N;++i){
               a[i]=sc.nextInt();
           }
           Arrays.sort(a);
           for(int i=0;i<N;++i){
               if(a[i]==-1)
                continue;
            for(int j=i+1;j<N;++j){
                if(a[j]%a[i]==0 && a[j]!=-1){
                    a[j]=-1;;
                }
            }
           }
           //int i=0;
           for(int i=0;i<N;++i){
               if(a[i]!= -1)
               count++;
           }

           System.out.println(count);
        } // End of test cases loop

    }//end of main function

} //end of class


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
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);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int N = in.nextInt();
            Integer a[] = in.nextIntArray(N);
            Arrays.sort(a);
            int colors = 0;
            for (int i = 0; i < N; i++) {
                if (a[i] == -1) continue;
                colors++;
                for (int j = i + 1; j < N; j++) {
                    if (a[j] % a[i] == 0) {
                        a[j] = -1;
                    }
                }
            }
            out.printLine(colors);
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tokenizer = null;

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

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

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

        public Integer[] nextIntArray(int size) {
            Integer array[] = new Integer[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

    }

    static class OutputWriter {
        PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


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();
	}
}


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);

	}

}


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);
    }
}


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());
        }

    }
}


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());
	}
}


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());
    }
}


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);
    }
}


import java.util.*;

public class task1 {
    static void print(Object... a) {
        for (Object aa : a) {
            System.out.println(aa.toString());
        }
    }

    static Map<Character, Integer> stringToCharsMap(String str) {
        Map<Character, Integer> charcount = new HashMap<Character, Integer>();
        for (Character c : str.toCharArray()) {
            if (charcount.containsKey(c)) {
                charcount.put(c, charcount.get(c) + 1);
            } else {
                charcount.put(c, 1);
            }
        }
        return charcount;
    }

    static Set<Character> stringToCharsSet(String str) {
        Set<Character> chars = new HashSet<>();
        for (Character c : str.toCharArray()) {
            chars.add(c);
        }
        return chars;
    }

    static int[] readArrayOfInt() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int array[] = new int[a];
        for (int i = 0; i < a; i++) {
            array[i] = sc.nextInt();
        }
        return array;
    }

    static class Point {
        double x;
        double y;

        Point(double x, double y) {
            this.x = x;
            this.y = y;
        }

        double distance(Point p) {
            return Math.sqrt((this.x - p.x) * (this.x - p.x) + (this.y - p.y) * (this.y - p.y));
        }

        double distance(Line l) {
            return Math.abs(l.a * this.x + l.b * this.y + l.c) / Math.sqrt(l.a * l.a + l.b * l.b);
        }
    }

    static class Line {
        double a;
        double b;
        double c;
        double EPS = 1e-6;

        Line(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

        Line(Point f, Point s) {
            this.a = f.y - s.y;
            this.b = s.x - f.x;
            this.c = -this.a * f.x - this.b * f.y;
        }

        double distance(Point p) {
            return Math.abs(this.a * p.x + this.b * p.y + this.c) / Math.sqrt(this.a * this.a + this.b * this.b);
        }

        boolean isPointOnLine(Point p) {
            return p.x * this.a + p.y * this.b + this.c < EPS;
        }

        Point linesIntersection(Line a) {
            double x = -(this.c * a.b - a.c * this.b) / (this.a * a.b - a.a * this.b);
            double y = -(this.a * a.c - a.a * this.c) / (this.a * a.b - a.a * this.b);
            return new Point(x, y);
        }
    }

    static HashMap<Integer, Integer> getDels(int a) {
        HashMap<Integer, Integer> h = new HashMap<>();
        int i = 2;
        while (a != 1) {
            if (a % i == 0) {
                if (h.containsKey(i)) {
                    h.put(i, h.get(i) + 1);
                } else {
                    h.put(i, 1);
                }
                a = a / i;
            } else {
                i++;
            }
        }
        return h;
    }

    static class Rect {
        Point fcorner;
        Point scorner;

        Rect(Point f, Point s) {
            fcorner = f;
            scorner = s;
        }

        double volume() {
            return Math.abs((fcorner.x - scorner.x) * (fcorner.y - scorner.y));
        }
    }

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int arr[] = new int[n];
        int c[] = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        int count = 1;
        c[0] = 1;
        for (int i = 1; i < arr.length; i++) {
            for (int j = 0; j < i; j++) {
                if (arr[i] % arr[j] == 0) {
                    c[i] = c[j];
                    break;
                }
            }
            if (c[i] == 0) {
                c[i] = count + 1;
                count++;
            }
        }
        System.out.println(count);
    }
}


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());
        }

    }
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class wef {
public static class FastReader {
	BufferedReader br;
	StringTokenizer st;
	//it reads the data about the specified point and divide the data about it ,it is quite fast
	//than using direct

	public FastReader() {
		br = new BufferedReader(new InputStreamReader(System.in));
	}

	String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception r) {
				r.printStackTrace();
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(next());//converts string to integer
	}

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

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

	String nextLine() {
		String str = "";
		try {
			str = br.readLine();
		} catch (Exception r) {
			r.printStackTrace();
		}
		return str;
	}
}
static ArrayList<String>list1=new ArrayList<String>();
static void combine(String instr, StringBuffer outstr, int index,int k)
{
	if(outstr.length()==k)
	{
		list1.add(outstr.toString());return;
	}
	if(outstr.toString().length()==0)
	outstr.append(instr.charAt(index));
    for (int i = 0; i < instr.length(); i++)
    {
        outstr.append(instr.charAt(i));

        combine(instr, outstr, i + 1,k);
        outstr.deleteCharAt(outstr.length() - 1);
    }
   index++;
}
static ArrayList<ArrayList<Integer>>l=new ArrayList<>();
static void comb(int n,int k,int ind,ArrayList<Integer>list)
{
	if(k==0)
	{
		l.add(new ArrayList<>(list));

		return;
	}

	for(int i=ind;i<=n;i++)
	{
		list.add(i);
		comb(n,k-1,ind+1,list);

		list.remove(list.size()-1);

	}

}
static long sum(long n)
{
	long sum=0;
	while(n!=0)
	{
		sum+=n%10;
		n/=10;
	}
	return sum;
}

static boolean check(HashMap<Integer,Integer>map)
{
	for(int h:map.values())
		if(h>1)
			return false;
	return true;
}

static class Pair implements Comparable<Pair>{
    int x;int y;
    Pair(int x,int y){
        this.x=x;
        this.y=y;
      //  this.i=i;
    }
	@Override
	public int compareTo(Pair o) {
		// TODO Auto-generated method stub
		return x-o.x;

	}
}
static boolean isPrime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so
    // that we can skip
    // middle five numbers
    // in below loop
    if (n % 2 == 0 ||
        n % 3 == 0)
        return false;

    for (int i = 5;
             i * i <= n; i = i + 6)
        if (n % i == 0 ||
            n % (i + 2) == 0)
            return false;

    return true;
}

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

public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));

	public static void main(String[] args) {
		// TODO Auto-generated method stub
	FastReader in=new FastReader();
	HashMap<Integer,Integer>map=new HashMap<Integer,Integer>();
	ArrayList<Integer>list=new ArrayList<Integer>();
	TreeSet<Integer>set=new TreeSet<Integer>();

	int n=in.nextInt();
	for(int i=0;i<n;i++)
		set.add(in.nextInt());

	int ans=0;

	while(!set.isEmpty())
	{
		int f=set.first();
		int s=f;
		while(!set.isEmpty()&&s<=set.last())
		{
			if(set.contains(s))
			set.remove(new Integer(s));
			s+=f;
		}
		ans++;

	}
	out.println(ans);

	out.close();

	}
}


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);
	}

}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class Mainm {
    static int mod1 = (int) (1e9 + 7);

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        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 nextString() throws IOException {
            String str00 = scan.next();
            return str00;
        }

        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);
        }

        String next() throws IOException {
            int c;
            for (c = read(); c <= 32; c = read());
            StringBuilder sb = new StringBuilder();
            for (; c > 32; c = read()) {
                sb.append((char) c);
            }
            return sb.toString();
        }

        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 int[] nextArray(int n) throws IOException {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }
    }

    static int GCD(int a, int b)
    {
        if (b == 0)
            return a;
        return GCD(b, a % b);
    }

    static  long power(long x, long y, long p)
    {
        int res = 1;      // Initialize result

        return res;
    }

    static boolean primeCheck(long num0) {
        boolean b1 = true;
        if (num0 == 1) {
            b1 = false;
        } else {
            int num01 = (int) (Math.sqrt(num0)) + 1;
            me1:
            for (int i = 2; i < num01; i++) {
                if (num0 % i == 0) {
                    b1 = false;
                    break me1;
                }
            }
        }
        return b1;
    }

    public static int dev(long num1)
    {
        int count00=0;
        while (num1%2==0)
        {
            count00++;
            num1/=2;
        }
        HashMap<Long,Long> hashMap=new HashMap<>();
        if(count00!=0)
        {
            hashMap.put(2L,(long)count00);
        }
        for (int i = 3; i <= (int)Math.sqrt(num1); i = i + 2)
        {
            // While i divides n, print i and divide n
            if(num1%i==0) {
                int count01 = 0;

                while (num1 % i == 0) {
                    num1 /= i;
                    count01++;
                }
                hashMap.put((long)i,(long)count01);
            }
        }
        if(num1>2)
        {
            hashMap.put((long)num1,1L);
        }
        long numOfDiv=1;
        for(long num00:hashMap.keySet())
        {
            long cDiv0=hashMap.get(num00);
            numOfDiv*=(cDiv0+1);
        }

        return (int)(numOfDiv);
    }

    public static long solve(long[] arr1, long N)
    {
        int n=(int)N;
        HashMap<Long,Integer> hm=new HashMap<>();
        for(int i=0;i<n;i++)
        {
            if(hm.containsKey(arr1[i]))
            {

            }
            else
            {
                hm.put(arr1[i],1);
            }
        }

        long count1=0;
        for(int i=0;i<n;i++)
        {
            long num1=arr1[i]*arr1[i];
            if(hm.containsKey(num1))
            {
                count1+=hm.get(num1);
                if(arr1[i]==1)
                {
                    count1--;
                }

            }
        }
        return count1;
    }

    public static void main(String[] args) throws IOException {
        Reader r = new Reader();
        //PrintWriter writer=new PrintWriter(System.out);
        //Scanner r = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        //Scanner r=new Scanner(System.in);
        OutputWriter770 out77 = new OutputWriter770(System.out);

        int num1=r.nextInt();
        int[] arr1=r.nextArray(num1);
        Arrays.sort(arr1);

        int res1=0;
        for(int i=0;i<num1;i++)
        {
            if(arr1[i]!=-1)
            {
                res1++;
                int num2=arr1[i];
                arr1[i]=-1;
                for(int j=i+1;j<num1;j++)
                {
                    if(arr1[j]%num2==0)
                    {
                        arr1[j]=-1;
                    }
                }
            }
        }
        out77.print(res1+"");
        r.close();
        out77.close();
    }
}

class OutputWriter770
{
    BufferedWriter writer;

    public OutputWriter770(OutputStream stream)
    {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }
    public void print(int i) throws IOException
    {
        writer.write(i + "");
    }

    public void println(int i) throws IOException
    {
        writer.write(i + "\n");
    }

    public void print(String s) throws IOException
    {
        writer.write(s + "");
    }

    public void println(String s) throws IOException
    {
        writer.write(s + "\n");
    }

    public void print(char[] c) throws IOException
    {
        writer.write(c);
    }

    public void close() throws IOException
    {
        writer.flush();
        writer.close();
    }
}

class node
{
    int source,dest;
    long difDist;
    node(int source,int dest,long tDst, long hDst)
    {
        this.source=source;
        this.dest=dest;
        this.difDist=hDst-tDst;
    }
}


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;
        }
    }
}


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();
	}
}


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;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jenish
 */
public class Main {
    public static void main(String[] args) {
        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 arr[] = new int[n];
            in.scanInt(arr);
            CodeX.sort(arr);
            int ans = 0;
            boolean vissited[] = new boolean[n];
            for (int i = 0; i < n; i++) {
                if (!vissited[i]) {
                    ans++;
                    for (int j = 0; j < n; j++) {
                        if (arr[j] % arr[i] == 0) {
                            vissited[j] = true;
                        }
                    }
                }
            }

            out.println(ans);
        }

    }

    static class CodeX {
        public static void sort(int arr[]) {
            merge_sort(arr, 0, arr.length - 1);
        }

        private static void merge_sort(int A[], int start, int end) {
            if (start < end) {
                int mid = (start + end) / 2;
                merge_sort(A, start, mid);
                merge_sort(A, mid + 1, end);
                merge(A, start, mid, end);
            }

        }

        private static void merge(int A[], int start, int mid, int end) {
            int p = start, q = mid + 1;
            int Arr[] = new int[end - start + 1];
            int k = 0;

            for (int i = start; i <= end; i++) {
                if (p > mid)
                    Arr[k++] = A[q++];

                else if (q > end)
                    Arr[k++] = A[p++];

                else if (A[p] < A[q])
                    Arr[k++] = A[p++];

                else
                    Arr[k++] = A[q++];
            }
            for (int i = 0; i < k; i++) {
                A[start++] = Arr[i];
            }

        }

    }

    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 I = 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') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

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

        public void scanInt(int[] A) {
            for (int i = 0; i < A.length; i++) A[i] = scanInt();
        }

    }
}


			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;
					        }
					    }
					}


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));
    }
}


import java.awt.*;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    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();
        }
        boolean vis[]=new boolean[n];
        int c=0;
        for (int i=0;i<n;i++){
            int min=200;
            for (int j=0;j<n;j++){
                if (!vis[j] && min>arr[j]){
                    min=arr[j];
                }
            }
            for (int j=0;j<n;j++){
                if (!vis[j]&&arr[j]%min==0){
                    vis[j]=true;
//                    System.out.println(arr[j]);
                }
            }
            if (min!=200){
                c++;
//                System.out.println(min+" k");
            }else break;
        }
        System.out.println(c);
    }
}


import static java.lang.Math.*;
import static java.util.Arrays.* ;

import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class D
{
    int [][] adjList ;
    int dfs(int u , int p )
    {
        int size = 1 ;
        for(int v : adjList[u])
            if(v != p )
            {
                int curr = dfs(v,  u) ;
                size += curr ;
            }
        return size ;
    }

    void main() throws Exception
    {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = sc.nextInt() ;
        int [] a = new int [n] ;
        boolean [] vis = new boolean[n] ;
        int cnt = 0 ;
        for(int i = 0 ;i < n ; i++)
            a[i] = sc.nextInt() ;
        sort(a);
        for(int i = 0 ;i  < n ; i ++)
        {
            if(!vis[i])
            {
                for(int j= i  ; j < n ; j++)
                    if(a[j] % a[i] == 0)
                        vis[j] = true ;

                cnt ++ ;
            }
        }

        out.println(cnt);
        out.flush();
        out.close();
    }

    class SegmentTree
    {
        int [] sTree ;
        int [] lazy ;
        int N ;

        SegmentTree(int n)
        {
            N = 1 << (32 - Integer.numberOfLeadingZeros(n - 1)) ;
            sTree = new int [N << 1] ;
            lazy= new int [N << 1] ;
        }
        void push(int node , int b , int e , int mid)
        {
            sTree[node << 1] += (mid - b + 1) * lazy[node] ;
            sTree[node << 1 | 1] += (e - mid) * lazy[node] ;
            lazy[node << 1] += lazy[node] ;
            lazy[node << 1 | 1] += lazy[node] ;
            lazy[node] = 0 ;
        }
        void updateRange(int node , int b , int e , int i , int j , int val)
        {
            if(i > e || j < b)return;

            if(i <= b && e <= j)
            {
                sTree[node] += (e - b + 1) * val ;
                lazy[node] += val ;
                return;
            }

            int mid = b + e >> 1 ;
            push(node , b , e , mid) ;
            updateRange(node << 1 , b , mid , i , j , val);
            updateRange(node << 1 | 1 , mid + 1 , e , i , j , val);
            sTree[node] = sTree[node << 1] + sTree[node << 1 | 1] ;
        }
        int query(int node , int b , int e , int i , int j)
        {
            if(i > e || j < b)
                return 0 ;
            if(i <= b && e <= j)
                return sTree[node] ;
            int mid = b + e >> 1 ;
            push(node  , b , e , mid);
            return query(node << 1 , b , mid , i , j) + query(node << 1 | 1 , mid + 1 , e , i , j) ;
        }

    }
    class Compressor
    {
        TreeSet<Integer> set = new TreeSet<>() ;
        TreeMap<Integer ,Integer> map = new TreeMap<>()  ;

        void add(int x)
        {
            set.add(x) ;
        }
        void fix()
        {
            for(int x : set)
                map.put(x , map.size() + 1) ;
        }
        int get(int x)
        {
            return map.get(x) ;
        }
    }
    class Scanner
    {
        BufferedReader br ;
        StringTokenizer st ;

        Scanner(InputStream in)
        {
            br = new BufferedReader(new InputStreamReader(in)) ;
        }
        String next() throws Exception
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine()) ;
            return st.nextToken() ;
        }
        int nextInt() throws Exception
        {
            return Integer.parseInt(next()) ;
        }
        long nextLong() throws Exception
        {
            return Long.parseLong(next()) ;
        }
        double nextDouble() throws Exception
        {
            return Double.parseDouble(next()) ;
        }
    }

    public static void main (String [] args) throws Exception {(new D()).main();}

}


import java.io.*;
import java.util.*;

public class A
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        ArrayList<Integer> list = new ArrayList<>();
        ntok();
        for (int i = 0; i < n; i++)
        {
            list.add(ipar());
        }
        Collections.sort(list);
        HashSet<Integer> set = new HashSet<>();
        for (int x : list)
        {
            boolean add = true;
            for (int y : set)
            {
                if (x % y == 0)
                {
                    add = false;
                    break;
                }
            }
            if (add)
            {
                set.add(x);
            }
        }
        out.println(set.size());

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public int[] iapar(int n)
    {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        return arr;
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public long[] lapar(int n)
    {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = lpar();
        }
        return arr;
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new A().go();
    }
}