$_='a(b(c)d(e(f)g)h)i(j(k)l(m)n)o'; $_='a(b(c)d(e(f(g)h)i(j(k)l(m)n)o)'; print 1 while s/[(][^()][)]//;