#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[n];
  cin >> a;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] != a[i + 1]) {
      ++ans;
      ++i;
    } else {
      ++ans;
    }
  }
  cout << ans;
  return 0;
}
