import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int N = in.nextInt(); String up_down = in.next(); int curPos = 0; int valleyCount = 0; boolean inValley = false; for(int i = 0; i