#Lutece1643. 括号匹配

括号匹配

Migrated from Lutece 1643 括号匹配

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给你一个仅包含('('?'?'的括号序列,你需要把每个?'?'替换为('(')')'
请问有多少种替换方法,使得最后的括号序列是一个合法括号序列?
答案可能很大,请输出模42949672964294967296后的答案

Input

输入一个字符串,长度不超过100000100000

Output

输出模42949672964294967296后方案数

Samples

(???
2

Resources

missever