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.*;

public class Main {
//	static Scanner in; static int next() throws Exception {return in.nextInt();};
//	static StreamTokenizer in; static int next() throws Exception {in.nextToken(); return (int) in.nval;}
	static BufferedReader in;
	static PrintWriter out;

	static int mod = 1000000007;

	static int div4(long x) {
		long y = x;
		while (y % 4 != 0) y += mod;
		return (int)(y >> 2);
	}

	static TreeMap<String, Integer>[] map;

	static int go(String s, int kol) {
		if (map[kol].containsKey(s)) return map[kol].get(s);
		int n = s.length();
		if (n == 0) return kol == 0 ? 1 : 0;
		int[] sum = new int[n + 1];
		for (int i = 0; i < n; i++)
			sum[i + 1] = sum[i] + (s.charAt(i) == '(' ? 1 : -1);

		ArrayList<Integer> pos = new ArrayList<Integer>();

		for (int i = 0; i <= n; i++) if (sum[i] == 0) pos.add(i);

		if (pos.size() == 2) {
			if (kol == 1) {
				long answ = 0;
				answ += go(s.substring(1, n - 1), 0) * 4L;
				answ += go(s.substring(1, n - 1), 1) * 3L;
				answ += go(s.substring(1, n - 1), 2) * 2L;
				return (int)(answ % mod);
			}
		   	else return 0;
		}

		long answ = 0;
		int p = pos.get(1);
		long[] x = new long[] {go(s.substring(0, p), 0), go(s.substring(0, p), 1), go(s.substring(0, p), 2)};
		long[] y = new long[] {go(s.substring(p, n), 0), go(s.substring(p, n), 1), go(s.substring(p, n), 2)};
		
		answ = 0;
			answ += x[0] * y[0] % mod;
			answ += div4(x[0] * y[1] % mod * 2);
			answ += div4(x[1] * y[0] % mod * 2);
			answ += div4(div4(x[1] * y[1] % mod) * 2);
		map[0].put(s, (int)(answ % mod));

		answ = 0;
			answ += div4(x[1] * y[0] % mod * 2);
			answ += div4(x[0] * y[1] % mod * 2);
			answ += div4(x[1] * y[1] % mod * 2);
			answ += x[2] * y[0] % mod;
			answ += x[0] * y[2] % mod;
			answ += div4(x[1] * y[2] % mod);
			answ += div4(x[2] * y[1] % mod);
		map[1].put(s, (int)(answ % mod));

		answ = 0;

			answ += div4(x[1] * y[1] % mod);
			answ += div4(x[1] * y[2] % mod * 2);
			answ += div4(x[2] * y[1] % mod * 2);
			answ += div4(x[2] * y[2] % mod * 2);
		map[2].put(s, (int)(answ % mod));

		return map[kol].get(s);
	}

	public static void main(String[] args) throws Exception {
//		in = new Scanner(System.in);
//		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		String s = in.readLine();

		map = new TreeMap[3];
		for (int i = 0; i < 3; i++) map[i] = new TreeMap<String, Integer>();

		out.println(((go(s, 0) + go(s, 1)) % mod + go(s, 2)) % mod);

		out.close();
	}
}