import java.util.*; public class Tsurukame { public static void main(String[] arg){ Scanner sc = new Scanner(System.in); int n,tsuru,kame,sum,temp,flag; n = sc.nextInt(); int[] leg = new int[n]; for(int i = 0;i0){ kame++; }else{ tsuru++; } }else{ if(kame>0){ tsuru++; }else{ kame++; } } }else{ int j = 0; while(j