#include <bits/stdc++.h>   using namespace std;   int main() {     int n = 0;     int answer = 0;     cin >> n;     int last = -1;     int xs = 0, ys = 0, x = 0, y = 0;     for (int i = 0; i < n; i++) {       int px = x, py = y;       char c;       cin >> c;       if (c ==  L )         x--;       else if (c ==  R )         x++;       else if (c ==  U )         y++;       else         y--;       if (abs(x - xs) + abs(y - ys) != i - last)         answer++, last = i - 1, xs = px, ys = py;     }     answer++;     cout << answer;   }   