{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ch3 class\u003d\"problem_subtitle\"\u003eBackground\u003c/h3\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eRegardless of the fact, that Vologda could not get rights to hold the Winter Olympic games of 20**, it is well-known, that the city will conduct one of the Formula 1 events. Surely, for such an important thing a new race circuit should be built as well as hotels, restaurants, international airport - everything for Formula 1 fans, who will flood the city soon. But when all the hotels and a half of the restaurants were built, it appeared, that at the site for the future circuit a lot of gophers lived in their holes. Since we like animals very much, ecologists will never allow to build the race circuit over the holes. So now the mayor is sitting sadly in his office and looking at the map of the circuit with all the holes plotted on it.\u003c/div\u003e\u003c/div\u003e\u003ch3 class\u003d\"problem_subtitle\"\u003eProblem\u003c/h3\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eWho will be smart enough to draw a plan of the circuit and keep the city from inevitable disgrace? Of course, only true professionals - battle-hardened programmers from the first team of local technical university!.. But our heroes were not looking for easy life and set much more difficult problem: \"Certainly, our mayor will be glad, if we find how many ways of building the circuit are there!\" - they said.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIt should be said, that the circuit in Vologda is going to be rather simple. It will be a rectangle \u003cb\u003eN\u003c/b\u003e*\u003cb\u003eM\u003c/b\u003e cells in size with a single circuit segment built through each cell. Each segment should be parallel to one of rectangle\u0027s sides, so only right-angled bends may be on the circuit. At the picture below two samples are given for \u003cb\u003eN\u003c/b\u003e \u003d \u003cb\u003eM\u003c/b\u003e \u003d 4 (gray squares mean gopher holes, and the bold black line means the race circuit). There are no other ways to build the circuit here.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_centered_picture\"\u003e\u003cimg src\u003d\"CDN_BASE_URL/7def85661c8a17e1dea6c2071a7a5aa4?v\u003d1725678405\" border\u003d\"0\" alt\u003d\"Problem illustration\"\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains the integer numbers \u003cb\u003eN\u003c/b\u003e and \u003cb\u003eM\u003c/b\u003e (2 ≤ \u003cb\u003eN\u003c/b\u003e, \u003cb\u003eM\u003c/b\u003e ≤ 12). Each of the next \u003cb\u003eN\u003c/b\u003e lines contains \u003cb\u003eM\u003c/b\u003e characters, which are the corresponding cells of the rectangle. Character \".\" (full stop) means a cell, where a segment of the race circuit should be built, and character \"*\" (asterisk) - a cell, where a gopher hole is located. There are at least 4 cells without gopher holes.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eYou should output the desired number of ways. It is guaranteed, that it does not exceed 2\u003csup\u003e63\u003c/sup\u003e-1.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 4\r\n**..\r\n....\r\n....\r\n....\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 4\r\n....\r\n....\r\n....\r\n....\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}