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. */ int n,i,height=0,sum=0; Scanner scan = new Scanner (System.in); n=scan.nextInt(); int a[]= new int[n]; for(i=0;iheight) height=a[i]; } for(i=0;i