import java.io.*; import java.util.*; 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 num_steps = scanner.nextInt(); scanner.nextLine(); String steps = scanner.nextLine(); System.out.println(get_num_valleys(steps)); } public static int get_num_valleys(String steps){ int curr_level=0,prev=0, num_valleys =0; for(int i=0;i