{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"梦月是一位程序设计界的知名人物,他除了很电以外,让大部分人望尘莫及的部分是--他有女朋友。\n\n有天,梦月跟他的女友∀∀一起到夜市逛街,但夜市的人潮实在太多了,使他们两人走散了。于是梦月打电话给∀∀,发现他们两人在同一排的摊贩。于是∀∀在电话中对梦月说了n次的「前」或「后」,表示要梦月向前一公尺或向后一公尺,只要梦月照着∀∀的指引走,两人就能相遇。\n\n但是夜市里的杂音太多了,导致梦月有时听不见∀∀的指引,甚至就算听到了指引,也有可能是错的。梦月决定跟着他听见的(可能是听错的)指引走。而如果他听不见,则会投掷手上的硬币,如果是正面就向前走,否则就向后走;也就是说当他听不见时,他有50%的机率向前,也有50%的机率向后。\n\n梦月现在写下了他所听见∀∀的指引,请问如果梦月有多大的机率会与∀∀相遇呢?"}},{"title":"INPUT","value":{"format":"HTML","content":"输入的第一行包含一个长度为n(1≤n≤10)仅由「+」(加号)和「-」(减号)组成的字串,表示∀∀在电话中对梦月说的指引。其中,「+」表示向前一公尺,「-」表示向后一公尺。\n\n\u003cp\u003e第二行包含一个长度为n(1≤n≤10)仅由「+」(加号)、「-」(减号)、「?」(问号)组成的字串,表示梦月听见的指引。其中,「+」表示向前一公尺,「-」表示向后一公尺,「?」表示该指引他没听见。\u003c/p\u003e"}},{"title":"OUTPUT","value":{"format":"HTML","content":"\u003cp\u003e输出一个数,为两人相遇的机率。\u003c/p\u003e\n\u003cp\u003e你的答案与正确答案的绝对或相对误差在10\u003csup\u003e-9\u003c/sup\u003e内都算正确。\u003c/p\u003e"}},{"title":"SAMPLE INPUT 1","value":{"format":"HTML","content":"\u003cpre\u003e++-+-\n+-+-+\n\u003c/pre\u003e"}},{"title":"SAMPLE OUTPUT 1","value":{"format":"HTML","content":"\u003cpre\u003e1.00000000000000000000000000\n\u003c/pre\u003e"}},{"title":"SAMPLE INPUT 2","value":{"format":"HTML","content":"\u003cpre\u003e+-+-\n+-??\n\u003c/pre\u003e"}},{"title":"SAMPLE OUTPUT 2","value":{"format":"HTML","content":"\u003cpre\u003e0.50000000000000000000000001\n\u003c/pre\u003e"}},{"title":"SAMPLE INPUT 3","value":{"format":"HTML","content":"\u003cpre\u003e+++\n??-\n\u003c/pre\u003e"}},{"title":"SAMPLE OUTPUT 3","value":{"format":"HTML","content":"\u003cpre\u003e0.000000000000000000000000000\n\u003c/pre\u003e"}}]}