#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; cin>>n; int start = 0; int vals = 0; for(int i = 0; i < n; i++) { char x; cin>>x; if(x == 'U') { if(start == -1) vals++; start++; } else start--; } cout<