Problem: Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it.

You are given string s. It represents a correct bracket sequence. A correct bracket sequence is the sequence of opening ("(") and closing (")") brackets, such that it is possible to obtain a correct mathematical expression from it, inserting numbers and operators between the brackets. For example, such sequences as "(())()" and "()" are correct bracket sequences and such sequences as ")()" and "(()" are not.

In a correct bracket sequence each bracket corresponds to the matching bracket (an opening bracket corresponds to the matching closing bracket and vice versa). For example, in a bracket sequence shown of the figure below, the third bracket corresponds to the matching sixth one and the fifth bracket corresponds to the fourth one.

<image>

You are allowed to color some brackets in the bracket sequence so as all three conditions are fulfilled: 

  * Each bracket is either not colored any color, or is colored red, or is colored blue. 
  * For any pair of matching brackets exactly one of them is colored. In other words, for any bracket the following is true: either it or the matching bracket that corresponds to it is colored. 
  * No two neighboring colored brackets have the same color. 



Find the number of different ways to color the bracket sequence. The ways should meet the above-given conditions. Two ways of coloring are considered different if they differ in the color of at least one bracket. As the result can be quite large, print it modulo 1000000007 (109 + 7).

Input

The first line contains the single string s (2 ≤ |s| ≤ 700) which represents a correct bracket sequence. 

Output

Print the only number — the number of ways to color the bracket sequence that meet the above given conditions modulo 1000000007 (109 + 7).

Examples

Input

(())


Output

12


Input

(()())


Output

40


Input

()


Output

4

Note

Let's consider the first sample test. The bracket sequence from the sample can be colored, for example, as is shown on two figures below. 

<image> <image>

The two ways of coloring shown below are incorrect. 

<image> <image>

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

/**
 * Codeforces Round #106 (Div. 2), D
 * @author Roman Kosenko <madkite@gmail.com>
 */
public class C149D_ColoringBrackets {
	private static final int P = 1000000007;

	public static void main(String... args) throws IOException {
		long time = 0;
		if(args.length != 0) {
			System.setIn(new FileInputStream(args[0]));
			time = System.currentTimeMillis();
		} else if(!Boolean.parseBoolean(System.getProperty("ONLINE_JUDGE"))) {
			main("in/C149D.1.txt");
			main("in/C149D.2.txt");
			main("in/C149D.3.txt");
			//main("input.txt");
			return;
		}
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		s = br.readLine();

		long result = 1 - s.length();
		for(long i : solve(0))
			result += i;
		System.out.println(result % P);

		if(time != 0)
			System.out.println(System.currentTimeMillis() - time);
	}

	private static String s;
	private static long[] solve(int i) {
		long r[];
		if(s.charAt(i + 1) == '(') {
			long[] t = solve(i + 1);
			r = new long[] {
				(t[1] + t[2] + t[3] + t[5] + t[6] + t[8]) % P,
				(t[0] + t[2] + t[3] + t[4] + t[6] + t[7]) % P,
				(t[0] + t[1] + t[3] + t[5] + t[6] + t[7]) % P,
				(t[0] + t[1] + t[2] + t[4] + t[6] + t[8]) % P,
				0, 0, 0, 0, 0, i = (int)t[9] + 1};
		} else
			r = new long[]{1, 1, 1, 1, 0, 0, 0, 0, 0, ++i};
		if(i + 1 < s.length() && s.charAt(i + 1) == '(') {
			long[] t = solve(i + 1);
			r = new long[] {
				(r[0] * (t[0] + t[1] + t[6]) % P) % P,
				(r[1] * (t[0] + t[1] + t[6]) % P) % P,
				(r[2] * (t[2] + t[8]) % P + r[3] * (t[2] + t[4]) % P) % P,
				(r[2] * (t[3] + t[5]) % P + r[3] * (t[3] + t[7]) % P) % P,
				(r[0] * (t[2] + t[4] + t[8]) % P) % P,
				(r[1] * (t[3] + t[5] + t[7]) % P) % P,
				(r[2] * (t[1] + t[6]) % P + r[3] * (t[0] + t[6]) % P) % P,
				(r[0] * (t[3] + t[5] + t[7]) % P) % P,
				(r[1] * (t[2] + t[4] + t[8]) % P) % P,
				t[9]
			};
		}
		return r;
	}
}