func_code_string: #include <bits/stdc++.h>   using namespace std;   int read() {     int x = 0, flag = 1;     char ch = getchar();     while (!isdigit(ch)) {       if (ch ==  - ) flag = -1;       ch = getchar();     }     while (isdigit(ch)) {       x = (x << 3) + (x << 1) + (ch ^ 48);       ch = getchar();     }     return x * flag;   }   int n;   int s[109];   int main() {     n = read();     for (int i = (1), i_end_ = (n); i <= i_end_; ++i) {       char c = getchar();       if (c ==  U ) s[i] = 1;       if (c ==  R ) s[i] = 2;     }     int ans = 0, i = 1;     while (i <= n) {       if (s[i] == 1)         if (s[i + 1] == 2)           ++ans, i = i + 2;         else           i++;       else if (s[i] == 2)         if (s[i + 1] == 1)           ++ans, i = i + 2;         else           i++;     }     printf( %d n , n - ans);     return 0;   }   