#include <bits/stdc++.h>   #pragma GCC optimize( O3 )   using namespace std;   const int N = 1e3 + 5, OO = 0x3f3f3f3f, MOD = 1000000007, M = 200000 + 5;   const double EPS = 0.000000001;   int n, x, y;   char str[N];   int main() {     scanf( %d %s , &n, str);     for (int i = 0; i < n; ++i) {       x += str[i] ==  R  ? 1 : str[i] ==  L  ? -1 : 0;       y += str[i] ==  U  ? 1 : str[i] ==  D  ? -1 : 0;     }     x = abs(x);     y = abs(y);     printf( %d n , n - x - y);     return 0;   }   