#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; char c; int s=0,v=0; for(int i=0;i>c; if(c=='U'){ s++; } else if(s>0){ s--; } else{ if(s==0) v++; s--; } } cout<