import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); scan.nextLine(); String s = scan.nextLine(); char[] c = new char[n]; c = s.toCharArray(); int i=0,vc=0,curr_level=0; if(c[0] == 'D') vc=1; for(;i