#include<stdio.h>

int main(void)
{
	struct ho {
		struct ho* next;
		struct ho* prev;
		long int k; 
	};

	unsigned long int  b, c, N;
	struct ho a[200000];
	struct ho* start = a;
	int i, j = 1;
	struct ho* keep1;
	struct ho* keep2;

	scanf("%ld", &N);
	b = N;

	for (i = 0; i < N; i++) {
		scanf("%ld", &a[i].k);

		if (i != 0) {
			a[i].prev = &a[i - 1];
		}

		if (i + 1 != N) {
			a[i].next = &a[i + 1];
		}
			
		else {
			a[i].next = NULL;
		}
	}

	keep1 = a;
	keep1->prev = NULL;
	while (keep1 != NULL) {
		
		keep2 = start;
		while (NULL != keep2->next) {
			if (keep1->k % keep2->k == 0 && keep1 != keep2) {
				if (keep1->k == keep2->k) {
					b--;
					if (keep2->prev != NULL) {
						keep2->prev->next = keep2->next;
					}
					if (keep2->next != NULL) {
						keep2->next->prev = keep2->prev;
					}

					if (keep2 == start) {
						start = keep2->next;
					}
				}

				b--;
				if (keep1->prev != NULL) {
					keep1->prev->next = keep1->next;
				}
				if (keep1->next != NULL) {
					keep1->next->prev = keep1->prev;
				}

				if (keep1 == start) {
					start = keep1->next;
				}

				break;
			}

			else if (keep1 != keep2 && (keep2->k % keep1->k == 0)) {
				b--;
				if (keep2->prev != NULL) {
					keep2->prev->next = keep2->next;
				}
				if (keep1->next != NULL) {
					keep2->next->prev = keep2->prev;
				}

				if (keep2 == start) {
					start = keep2->next;
				}
			}
			keep2 = keep2->next;
		}
		keep1 = keep1->next;
	}

	printf("%ld", b);

	return 0;
}