#ABC201C. [ABC201C] Secret Number

    ID: 1175 Type: RemoteJudge 2000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>数论数学公式组合计数容斥原理基础语法一重循环基础算法模拟

[ABC201C] Secret Number

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 300300 points

Problem Statement

Takahashi has forgotten his PIN. The PIN is a four-digit string consisting of 0, 1, …\ldots, 9, and may begin with a 0.

For each digit 0 through 9, Takahashi remembers the following fact, represented by a 1010-character string S0S1…S9S_0S_1 \ldots S_9:

  • if SiS_i is o: he is certain that the PIN contained the digit ii;
  • if SiS_i is x: he is certain that the PIN did not contain the digit ii;
  • if SiS_i is ?: he is not sure whether the PIN contained the digit ii.

How many strings are there that could be Takahashi's PIN?

Constraints

  • SS is a 1010-character string consisting of o, x, and ?.

Input

Input is given from Standard Input in the following format:

SS

Output

Print the answer.

ooo???xxxx
108

Some of the possible PINs are 0123 and 0021.

o?oo?oxoxo
0

There may be no possible PINs, in which case the answer is 00.

xxxxx?xxxo
15