#include <bits/stdc++.h>
int main() {
  char s[101];
  int n, m = 0;
  scanf("%d", &n);
  scanf("%c", &s[0]);
  for (int i = 1; i <= n; i++) scanf("%c", &s[i]);
  for (int i = 2; i <= n; i++)
    if (s[i - 1] != s[i]) {
      m++;
      i++;
    }
  printf("%d", n - m);
}
