Driver code
public static void main ( String args [ ] ) { String s ; s = " ) ) ) ( ( ( " ; System . out . println ( costToBalance ( s ) ) ; s = " ) ) ( ( " ; System . out . println ( costToBalance ( s ) ) ; } }