#include <bits/stdc++.h>
using namespace std;
int n, jumlah = 1;
char a[110];
bool b[110];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    if (a[i] != a[i - 1] && (b[i - 1] == false)) {
      b[i] = true;
      b[i - 1] = true;
    } else
      jumlah++;
  }
  cout << jumlah << endl;
}
