#include <bits/stdc++.h>
using namespace std;
const int mod = 1000003;
char str[2008];
int dp[2008][2108];
int main() {
  int i, j, k, n, tt;
  bool f = true;
  scanf("%s", str);
  n = strlen(str);
  memset(dp, 0, sizeof(dp));
  if (str[n - 1] > '9' || str[n - 1] < '0') f = false;
  tt = 0;
  for (i = 0; i < n && f; i = j) {
    int cnt, pp = -1;
    for (j = i; j < n && (str[j] > '9' || str[j] < '0'); j++)
      if (str[j] == '*' || str[j] == '/') pp = max(pp, j);
    if (pp != -1 && (tt == 0 || pp != i)) {
      f = false;
      continue;
    }
    cnt = j - i;
    ++cnt;
    if (tt == 0) {
      for (k = cnt; k <= 2100; k++) dp[tt][k] = 1;
    } else {
      for (k = cnt; k <= 2100; k++)
        dp[tt][k] =
            (dp[tt][k - 1] + dp[tt - 1][2100] - dp[tt - 1][k - cnt] + mod) %
            mod;
    }
    ++tt;
    for (; j < n && str[j] >= '0' && str[j] <= '9'; j++)
      ;
  }
  if (!f)
    printf("0");
  else
    printf("%d", dp[tt - 1][2100]);
  return 0;
}
