func_code_string: #include <bits/stdc++.h>   using namespace std;   char arr[205];   int main() {     ios::sync_with_stdio(0);     int n;     cin >> n;     for (int i = (0); i < (n); i++) cin >> arr[i];     long long res = 0;     pair<int, int> udlr;     for (int i = (0); i < (n); i++) {       udlr.first = 0;       udlr.second = 0;       for (int j = (i); j < (n); j++) {         if (arr[j] ==  U ) udlr.first += 1;         if (arr[j] ==  D ) udlr.first -= 1;         if (arr[j] ==  L ) udlr.second += 1;         if (arr[j] ==  R ) udlr.second -= 1;         if (udlr.second == 0 && udlr.first == 0) res++;       }     }     cout << res << endl;     return 0;   }   