#include <bits/stdc++.h>   using namespace std;   int n;   string s;   int main() {     cin >> n >> s;     int sol = n;     for (int i = 1; i < n; i++) {       if (s[i] != s[i - 1] and s[i - 1] !=  D ) {         sol--;         s[i] =  D ;       }     }     cout << sol << endl;   }   