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) throws IOException { Scanner sc = new Scanner(System.in); int n = Integer.valueOf(sc.nextLine()); String st = sc.nextLine(); int height = 0; int res=0; for(int i = 0; i