import java.util.*; import java.io.*; public class temp { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int k=sc.nextInt(); String s=sc.next(); s+='S'; int sea=0; char str[]=s.toCharArray(); boolean valley=false; if(str[0]=='D') {valley=true;sea--;} else sea++; int count=0; for(int i=1;i