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) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner scanner = new Scanner(System.in); int steps = scanner.nextInt(); String stepString = scanner.next(); //System.out.println(stepString); int stringLength = stepString.length(); char[] singleStep = new char[steps+1]; int temp =0; int tempPrevious =0; int valley =0; stepString.getChars(0,stringLength, singleStep,0); for (int i =0;i=0 && temp<0) { valley++; } } System.out.println(valley); } }