using System;
public class Program
{
public void swaps(string str)
Char[] ch = str.ToCharArray();
int swap = 0;
int right = 0;
int left = 0;
for (int i = 0; i < str.Length; i++)
if (ch[i].ToString() == "[")
right++;
}
else
left++;
if (left > right)
swap++;
Console.WriteLine(swap);
public static void Main()
string str = "[[][]]";
Program program = new Program();
program.swaps(str);