You are given a string S consisting of digits between 1 and 9, inclusive.
You can insert the letter + into some of the positions (possibly none) between two letters in this string.
Here, + must not occur consecutively after insertion.
All strings that can be obtained in this way can be evaluated as formulas.
Evaluate all possible formulas, and print the sum of the results.

-----Constraints-----
 - 1 \leq |S| \leq 10
 - All letters in S are digits between 1 and 9, inclusive.

-----Input-----
The input is given from Standard Input in the following format:
S

-----Output-----
Print the sum of the evaluated value over all possible formulas.

-----Sample Input-----
125

-----Sample Output-----
176

There are 4 formulas that can be obtained: 125, 1+25, 12+5 and 1+2+5. When each formula is evaluated,
 - 125
 - 1+25=26
 - 12+5=17
 - 1+2+5=8
Thus, the sum is 125+26+17+8=176.
[{"code": "import copy\n\ns=input()\nl=len(s)\nans=0\n\nif l==1:\n  ans+=int(s)\n  print(ans)\n  \nelse:\n  for i in range(2**(l-1)):\n    t=copy.deepcopy(s)\n    f=[]\n    ch=0\n    for j in range(l-1):\n      if ((i>>j)&1):\n        t=t[:j+1+ch]+'+'+t[j+1+ch:]\n        ch+=1\n     \n    if '+' in t:\n      \n      y=list(map(int,t.split('+')))\n      for u in y:\n        ans+=u\n    else:\n      ans+=int(t)\n      \n  print(ans)", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "s = input()\nL = []\nsigma = 0\ndef sprit_sum(string, sprit, num):\n    nonlocal sigma\n    for i in range(1,len(string)+num-sprit):\n        str_front = string[:i]\n        str_back = string[i:]\n        L.append(int(str_front)) \n        if num < sprit:\n            sprit_sum(str_back, sprit, num+1)\n        else:\n            L.append(int(str_back))\n            for x in L:\n                sigma += x\n            L.pop()\n        L.pop()\n        \nfor j in range(len(s)):\n    sprit_sum(s, j+1, 1)\nsigma += int(s)\nprint(sigma)\n", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "S = input()\nn = len(S)\n\ndef dfs(i, f):\n  if i == n - 1:\n    return sum(list(map(int, f.split('+'))))\n\n  return dfs(i+1, f+S[i+1]) + dfs(i+1, f+'+'+S[i+1])\n\nprint((dfs(0, S[0])))\n", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "s = input()\nl = len(s)-1\nres = 0\nfor i in range(2**l):\n    t = s[0]\n    for j in range(l):\n        if i&(1<<j):\n            t += \"+\"\n        t+=s[j+1]\n    res += eval(t)\nprint(res)", "passed": true, "time": 0.14, "memory": 14000.0, "status": "done"}, {"code": "S = input()\nl = len(S)\nans = 0\nfor i in range(l):\n    for j in range(i+1,l+1):\n        temp = int(S[i:j])\n        ans += temp * max(1,pow(2,i-1)) * max(1,pow(2,l-j-1))\nprint(ans)", "passed": true, "time": 0.15, "memory": 14092.0, "status": "done"}, {"code": "import itertools\nS = input()\nnpm = len(S) - 1\nsum = eval(S)\npcomb = []\nfor i in range(npm):\n    pcomb.append(list(itertools.combinations(list(range(1, npm + 1)), i + 1)))\nfor j in pcomb:\n    k = 0\n    for l in range(len(j)):\n        pcomb2 = j[k]\n        npmc = 0\n        F = S\n        for m in pcomb2:\n            F = F[:m + npmc] + \"+\" + F[m + npmc:]\n            npmc += 1\n        sum += eval(F)\n        k += 1\nprint(sum)\n", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "S=input()\nN=len(S)\nans=0\nfor i in range(2**(N-1)):\n    Bit = list(i+1 for i in range(N-1))\n    for j in range(N-1):\n        if (i >> j) & 1:\n            Bit[j] = 0\n    Bit=[b for b in Bit if b>0]\n    L=0\n    for b in Bit:\n        ans+=int(S[L:b])\n        L=b\n    ans+=int(S[L:])\nprint(ans)", "passed": true, "time": 0.2, "memory": 14304.0, "status": "done"}, {"code": "def dfs(i, f):\n    if i == n - 1:\n        return sum(list(map(int, f.split('+'))))\n\n    return dfs(i + 1, f + a[i + 1]) + dfs(i + 1, f + '+' + a[i + 1])\n\n\na = input()\nn = len(a)\n\nprint((dfs(0, a[0])))\n", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "s = input()\nlen_s = len(s)\n\ntotal = int(s)\neval_s = \"\"\ninsert_list = []\nfor i in range(1, 2 ** (len_s - 1)):\n  # print(i)\n  for j in range(len_s):\n    eval_s += s[j]\n    if ((i >> j) & 1):\n      # print(i, j)\n      eval_s += \"+\"\n  # print(eval_s)\n  total += eval(eval_s)\n  eval_s = \"\"\nprint(total)\n", "passed": true, "time": 0.15, "memory": 14248.0, "status": "done"}, {"code": "a=list(input())\nans=0\nfor i in range(2**(len(a)-1)):\n    s=a[0]\n    for j in range(len(a)-1):\n        if i%2:s+='+'\n        s+=a[j+1]\n        i//=2\n    ans+=eval(s)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14172.0, "status": "done"}, {"code": "S = input()\nn = len(S)\n \nans = 0\n \nfor i in range(2**(n-1)):\n    t = S[0]\n    for j in range(n-1):\n        if (i>>j)&1:\n            t += \"+\"\n        t += S[j+1]\n    ans += eval(t)\n \nprint(ans)", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "s=input()\nn=len(s)\nans=0\nfor i in range(2**(n-1)):\n    x=[0]*(n-1)\n    k=i\n    for j in range(n-1):\n        x[j]+=k//(2**(n-2-j))\n        k-=2**(n-2-j)*(k//(2**(n-2-j)))\n    a=s[0]\n    for j in range(n-1):\n        if x[j]==0:\n            a=a+s[j+1]\n        else:\n            ans+=int(a)\n            a=s[j+1]\n    ans+=int(a)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14336.0, "status": "done"}, {"code": "S=input()\nl=len(S)\nls=''\nfor i in range(1,l):ls+=str(i)\nsa=['']*(2*l-1)\nfor i in range(len(sa)):\n    if i%2==0:\n        sa[i]=S[i//2]\n\nimport copy\nimport itertools as it\nans=0\nfor i in range(l):\n    for j in list(it.combinations(ls, i)):\n        sx=copy.copy(sa)\n        for k in j:\n            k=int(k)\n            sx[2*k-1]='+'\n        ans+=eval(''.join(sx))\nprint(ans)", "passed": true, "time": 0.16, "memory": 14312.0, "status": "done"}, {"code": "s = input()\nn = len(s) - 1\nres = 0\nfor i in range(1 << n):\n    num_str = s[0]\n    for j in range(n):\n        if i >> j & 1 == 0:\n            num_str += s[j + 1]\n        else:\n            res += int(num_str)\n            num_str = s[j + 1]\n    res += int(num_str)\n\nprint(res)\n", "passed": true, "time": 0.19, "memory": 14096.0, "status": "done"}, {"code": "import copy\n\ns=list(input())\na=[]\nfor i in range(len(s)):\n    a.append(s[i])\n    if i !=len(s)-1:\n        a.append(\"\")\n\nans=0\n\nfor i in range(2**(len(s)-1)):\n    l=copy.deepcopy(a)\n    for j in range(len(s)-1):\n        if (i>>j&1):\n            l[2*j+1]=\"+\"\n    ans+=eval(\"\".join(l))\n\nprint(ans)", "passed": true, "time": 0.22, "memory": 14232.0, "status": "done"}, {"code": "s = input()\nl = len(s)\n\n\ndef dfs(i, x):\n    if i == l - 1:\n        return eval(x)\n    rep0 = dfs(i + 1, x + s[i + 1])\n    rep1 = dfs(i + 1, x + \"+\" + s[i + 1])\n    return rep0 + rep1\n\n\nans = dfs(0, s[0])\nprint(ans)\n", "passed": true, "time": 0.2, "memory": 14080.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\nans = 0\nfor bit in range(1 << n-1):\n    tmp = s[0]\n    for i in range(n-1):\n        if bit & (1 << i):\n            tmp += \"+\"\n        tmp += s[i+1]\n    \n    ans += sum(map(int,tmp.split(\"+\")))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "S = input()\nn = len(S)\nans = 0\nfor i in range(n):\n  a = int(S[i])\n  for j in range(n-i):\n    ans += a * 10**j * 2**i * 2**(max(0,n-i-j-2))\nprint(ans)", "passed": true, "time": 0.2, "memory": 14132.0, "status": "done"}, {"code": "N = str(int(input()))\ntotal = 0\nl = len(N)-1\nif l == 0:\n    print(N)\nelse:\n    for i in range(2**l):\n        b = format(i, '0'+str(l)+'b')\n        subtotal = 0\n        s = N[0]\n        for j in range(len(b)):\n            if int(b[j]):\n                subtotal += int(s)\n                s = N[j+1]\n            else:\n                s += N[j+1]\n\n        subtotal += int(s)\n        total += subtotal\n\n    print(total)", "passed": true, "time": 0.2, "memory": 14220.0, "status": "done"}, {"code": "s = input()\ns_sum = []\nfor i in range(2**(len(s)-1)):\n    sj = 0\n    a = 0\n    for j in range(len(s)-1):\n        if ((i>>j) & 1):\n            a += int(s[sj:j+1])\n            sj = j+1\n    a += int(s[sj:])\n    s_sum.append(a)\nprint(sum(s_sum))  ", "passed": true, "time": 0.15, "memory": 14244.0, "status": "done"}, {"code": "from itertools import product\ns=input()\na=0\nfor p in product((0,1),repeat=len(s)-1):\n    t=s[0]\n    for i,b in enumerate(p,start=1):\n        if b==1:\n            t+='+'+s[i]\n        else:\n            t+=s[i]\n    a+=eval(t)\nprint(a)\n", "passed": true, "time": 0.22, "memory": 14072.0, "status": "done"}, {"code": "s = list(input())\nn = len(s)\nans = 0\n\nfor i in range(2**(n-1)):\n    temp = s[0]\n    for j in range(n-1):\n        if i>>j & 1:\n            temp += \"+\" + s[j+1]\n        else:\n            temp += s[j+1]\n    ans += eval(temp)\n\nprint(ans)\n", "passed": true, "time": 0.2, "memory": 14240.0, "status": "done"}, {"code": "s = input()\nans = ''\nfor i in range(1 << (len(s) - 1)):\n    ans += s[0]\n    for j in range(len(s) - 1):\n      if i >> j & 1:\n        ans += ' '\n      ans += s[j+1]\n    ans += ' '\nprint(sum(map(int, ans.split())))", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "#\n# abc045 c\n#\nimport sys\nfrom io import StringIO\nimport unittest\n\n\nclass TestClass(unittest.TestCase):\n    def assertIO(self, input, output):\n        stdout, stdin = sys.stdout, sys.stdin\n        sys.stdout, sys.stdin = StringIO(), StringIO(input)\n        resolve()\n        sys.stdout.seek(0)\n        out = sys.stdout.read()[:-1]\n        sys.stdout, sys.stdin = stdout, stdin\n        self.assertEqual(out, output)\n\n    def test_\u5165\u529b\u4f8b_1(self):\n        input = \"\"\"125\"\"\"\n        output = \"\"\"176\"\"\"\n        self.assertIO(input, output)\n\n    def test_\u5165\u529b\u4f8b_2(self):\n        input = \"\"\"9999999999\"\"\"\n        output = \"\"\"12656242944\"\"\"\n        self.assertIO(input, output)\n\n\ndef resolve():\n    S = input()\n    L = len(S)\n\n    ans = 0\n    for bit in range(1 << L-1):\n        s = \"\"\n        for i in range(L):\n            if 1 << i & bit:\n                s += S[i]\n                s += \"+\"\n            else:\n                s += S[i]\n        ans += eval(s)\n\n    print(ans)\n\n\ndef __starting_point():\n    # unittest.main()\n    resolve()\n\n__starting_point()", "passed": true, "time": 0.27, "memory": 14476.0, "status": "done"}, {"code": "s = input()\nn = len(s)\nans = 0\nfor i in range(2**(n-1)):\n    t = []\n    x = i\n    for j in range(n-1):\n        t.append(s[j])\n        if x % 2 != 0:\n            t.append('+')\n        x = x // 2\n    t.append(s[-1])\n    m = 0\n    for i in t:\n        if i != '+':\n            m *= 10\n            m += int(i)\n        else:\n            ans += m\n            m = 0\n    ans += m\nprint(ans)", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "S = input()\nf = lambda x: 2**(x-1) if x > 0 else 1\nlenS = len(S)\nans = 0\nfor i in range(1,lenS+1):\n    for j in range(lenS-i+1):\n        ans += int(S[j:j+i]) * f(j) * f(lenS-j-i) \nprint(ans)", "passed": true, "time": 0.27, "memory": 14216.0, "status": "done"}, {"code": "s = input()\nans = 0\n\nfor bit in range(1 << len(s)-1):\n  f = s[0]\n\n  for i in range(len(s)-1):\n    if (bit & (1 << i)):\n        f += '+'\n    f += s[i+1]\n  ans += sum(map(int, f.split('+')))\n    \nprint(ans)", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "S = input()\nans = 0\n\nfor i in range(2**(len(S)-1)):\n    tmp = S[0]\n    for j in range(len(S)-1):\n        if i & (1 << j):\n            tmp += '+'\n        tmp += S[j+1]\n    ans += eval(tmp)\nprint(ans)\n", "passed": true, "time": 0.15, "memory": 14148.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\n\ndef dfs(now, total, i):\n    if i == n:\n        return total + now\n    else:\n        res = 0\n        res += dfs(now * 10 + int(s[i]), total, i + 1)\n        res += dfs(int(s[i]), total + now, i + 1)\n        return res\n\n\nprint((dfs(int(s[0]), 0, 1)))\n", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "from itertools import product\nS = input()\nif len(S)==1:\n    print(int(S))\nelse:\n    Sum = 0\n    for TR in product([0,1],repeat=(len(S)-1)):\n        Op = ['+' if TO==1 else '' for TO in TR]+['']\n        Sum += eval(''.join([TS+TO for TS,TO in zip(S,Op)]))\n    print(Sum)", "passed": true, "time": 0.15, "memory": 14312.0, "status": "done"}, {"code": "s = input()\nn = len(s)-1\nans = 0\nfor i in range(2**n):\n    op = [0]*n\n    for j in range(n):\n        if ((i >> j) & 1):\n            op[j] = 1\n    t = s[0]\n    for j in range(1,n+1):\n        if op[j-1] == 1:\n            t += '+' + s[j:j+1]\n        else:\n            t += s[j:j+1]\n    ans += sum(list(map(int,t.split('+'))))\nprint(ans)", "passed": true, "time": 0.27, "memory": 14060.0, "status": "done"}, {"code": "def hojyu(a):\n  if len(a)!=N:\n    return \"0\"*(N-len(a))+a\n  else:\n    return a\nS=input()\nN=len(S)-1\nR=list()\nans=0\nfor i in range(2**N):\n  s=str(bin(i)[2:])\n  s=hojyu(s)\n  b=0\n  mae=0\n  for k in range(len(s)):\n    if s[k]==\"1\":\n      b+=int(S[mae:k+1])\n      mae=k+1\n  b+=int(S[mae:])\n  ans+=b\nprint(ans)", "passed": true, "time": 0.15, "memory": 14132.0, "status": "done"}, {"code": "s = input()\nall_s = []\ndef ss(index, perm):\n    if index == len(s):\n        all_s.append(perm)\n    else:\n        perm1 = [i for i in perm]\n        perm1[-1] += s[index]\n        ss(index+1, perm1)\n\n        perm2 = [i for i in perm]\n        perm2.append(s[index])\n        ss(index+1, perm2)\n\nss(1, [s[0]])\nall_sum = 0\nfor way in all_s:\n    tmp = 0\n    for n in way:\n        tmp += int(n)\n    all_sum += tmp\nprint(all_sum)\n", "passed": true, "time": 0.23, "memory": 14296.0, "status": "done"}, {"code": "from itertools import product\nS = input()\ntotal = 0\nlength = len(S)\nList = list(product([0,1],repeat=length -1))\nformula = \"\"\nfor item in List:\n  formula = S[0]\n  for i in range(length-1):\n    if item[i] == 0:\n      formula += S[i+1]\n    else:\n      formula += '+'+S[i+1]\n  total += eval(formula)\nprint(total)", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "S = input()\n\nn = len(S)\n\nans = 0\nfor i in range(2**(n-1)):\n    tmp = 0\n    t = 0\n    for j in range(n-1):\n        if (i>>j)&1: \n            tmp += int(S[t:j+1])\n            t = j+1\n    tmp += int(S[t:])\n    ans += tmp\nprint(ans)\n", "passed": true, "time": 0.53, "memory": 14304.0, "status": "done"}, {"code": "S=input()\nl=len(S)\n\nls=[i for i in range(1,l)]\n    \nsa=[]\nfor i in range(len(S)):sa+=[S[i],'']\nsa=sa[:-1]\n\nimport copy\nimport itertools as it\nans=0\nfor i in range(l):\n for j in it.combinations(ls, i):\n    sx=copy.copy(sa)\n    for k in j:sx[2*k-1]='+'\n    ans+=eval(''.join(sx))\nprint(ans)", "passed": true, "time": 0.15, "memory": 14160.0, "status": "done"}, {"code": "s = input()\nl = len(s)\nans = 0\nfor i in range(2 ** (l-1)):\n    tmp = ''\n    sum = 0\n    for j in range(l-1):\n        tmp += s[j]\n        if i >> j & 1:\n            sum += int(tmp)\n            tmp = ''\n    sum += int(tmp + s[-1])\n\n    ans += sum\nprint(ans)", "passed": true, "time": 0.15, "memory": 14096.0, "status": "done"}, {"code": "S=input()\nl=len(S)\n\nimport itertools as it\na=0\nfor i in range(l):\n for j in it.combinations(range(1,l), i):\n  t='';p=0\n  for k in j:\n    t+=S[p:k]+'+'\n    p=k\n  t+=S[p:]\n  a+=eval(''.join(t))\nprint(a)", "passed": true, "time": 0.15, "memory": 14132.0, "status": "done"}, {"code": "#!/usr/bin/env python\n# coding: utf-8\n\n# In[3]:\n\n\nfrom itertools import product\n\n\n# In[16]:\n\n\nS = input()\n\n\n# In[17]:\n\n\nlength = len(S)\nans = 0\nfor lst in product([\"+\",\"\"], repeat=length-1):\n    mystr = \"\"\n    for i in range(length-1):\n        mystr += S[i]+lst[i]\n    mystr += S[-1]\n    mylist = [int(x) for x in mystr.split(\"+\")]\n    ans += sum(mylist)\nprint(ans)\n\n\n# In[ ]:\n\n\n\n\n", "passed": true, "time": 0.22, "memory": 14272.0, "status": "done"}, {"code": "S = str(input())\nans = 0\nfor i in range(2**(len(S)-1)):\n  s = S[0]\n  for j in range(len(S)-1):\n    if (i>>j) & 1:\n      s += '+'\n    s += S[j+1]\n  ans += eval(s)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "s = str(input())\nans = 0\nfor i in range(2**(len(s) - 1)):\n    l = s[0]\n    for j in range(len(s)-1):\n        if (i >> j) & 1:\n            l += \"+\"\n        l += s[j+1]\n    ans += eval(l)#eval\u95a2\u6570\u306f\u6587\u5b57\u5217\u3092\u6570\u5f0f\u3068\u3057\u3066\u305d\u306e\u89e3\u3092\u8fd4\u3059\nprint(ans)", "passed": true, "time": 0.22, "memory": 14072.0, "status": "done"}, {"code": "S=input()\nn=len(S)\nans=0\n \nfor paint in range(2**(n-1)):\n\ttemp_S=S[0]\n \n\tfor i in range(n-1):\n\t\tif (paint>>i)&1==1:\n\t\t\ttemp_S+=\"+\"\n\t\ttemp_S+=S[i+1]\n \n\tans+=sum(map(int, temp_S.split(\"+\")))\nprint(ans)", "passed": true, "time": 0.15, "memory": 14252.0, "status": "done"}, {"code": "s = input()\n\ntotal = 0\n\nfor i in range(len(s)):\n  for j in range(len(s) - i):\n    n = int(s[j:j+i+1])\n    if j == 0 or j == len(s) - i - 1:\n      total += n * max([(2 ** (len(s) - i - 2)), 1])\n    else:\n      total += n * max([(2 ** (len(s) - i - 3)), 1])\n      \nprint(total)", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "s = input()\nn = len(s)\nans = 0\n\nfor i in range(2 ** (n - 1)):\n    k = 0\n    num_list = []\n    for j in range(n):\n        if (i >> j) & 1:\n            num = s[k : j + 1]\n#             print(num)\n            k = j + 1\n            num_list.append(int(num))\n#             print(num_list)\n    num = s[k : n +1]\n    num_list.append(int(num))\n    ans += sum(num_list)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "s = input()\nn = len(s)\ndef dfs(i, f):\n    if i == n-1:\n        return sum(list(map(int,f.split('+'))))\n    return dfs(i+1, f+s[i+1]) + dfs(i+1, f+'+'+s[i+1])\nprint(dfs(0, s[0]))", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "s = input()\n\nn = len(s)-1\nans = 0\nfor i in range(2**n):\n  t = s[0]\n  for j in range(n):\n    if i >> j & 1: t += \"+\" # \u8a72\u5f53\u3059\u308b\u5834\u5408\u306e\u307f\"+\"\u3092\u8ffd\u52a0\u3059\u308b\n    t += s[j+1] # \u6b21\u306e\u6587\u5b57\u3092\u8ffd\u52a0\n  ans += eval(t) # \u751f\u6210\u3057\u305f\u6587\u5b57\u5217\u3092\u8a08\u7b97\nprint(ans)", "passed": true, "time": 0.15, "memory": 14136.0, "status": "done"}, {"code": "def dfs(i, f):\n    if i == n-1:\n        return sum(list(map(int, f.split(\"+\"))))\n\n    return dfs(i+1, f + \"+\" + s[i+1]) + dfs(i+1, f + s[i+1])\n\n\ns = input()\nn = len(s)\n\nprint(dfs(0, s[0]))", "passed": true, "time": 0.2, "memory": 14180.0, "status": "done"}, {"code": "S=(input())\nlen_S=len(S)\nans=0\nleft=0\nis_plus=[0]*(len_S-1)\nfor i in range(2**(len_S-1)):\n    left=0\n    for j in range(len_S-1):\n        i,mod=divmod(i,2)\n        if mod==1:\n            #print(left,j)\n            ans+=int(S[left:j+1])\n            left=j+1\n    ans+=int(S[left:len_S])\nprint(ans)", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\nans = 0\n\nfor bit in range(1 << (n - 1)):\n    # \u5404\u5834\u5408\u3067\u5f0f f \u3092\u751f\u6210\u3059\u308b\n    f = s[0]\n\n    for i in range(n - 1):\n        if bit & (1 << i):\n            # \u30d5\u30e9\u30b0\u304c\u7acb\u3063\u3066\u3044\u308b\u306a\u3089\u3070 \"+\" \u3092\u5f0f\u306e\u672b\u5c3e\u306b\u8ffd\u52a0\u3059\u308b\n            f += \"+\"\n        f += s[i + 1]\n\n    ans += sum(map(int, f.split(\"+\")))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "# \u6bce\u56de\u633f\u308c\u308b\u304b\u633f\u308c\u306a\u3044\u304b\u306e\u4e8c\u629e\u306e\u63a2\u7d22\u3092\u3057\u3066\u307f\u308b\n# 2\u5024\u306a\u306e\u3067bit\u5168\u63a2\u7d22\u3092\u3084\u3063\u3066\u307f\u308b\n# \u9006\u30dd\u30fc\u30e9\u30f3\u30c9\u5fc5\u8981\u304b\uff1f\u3068\u601d\u3063\u305f\u3051\u3069\u52a0\u7b97\u3060\u3051\u3060\u3057\u3044\u3089\u3093\u304b\u3063\u305f\u308f\u52a9\u304b\u308b\ns = input()\nans = 0\nfor bit in range(0, 1 << len(s) - 1):\n    opr = []\n    for i in range(len(s) - 1):\n        opr.append(\"\u6c34\u7740\" if bit >> i & 1 == 1 else \"\u30ef\u30f3\u30d4\u30fc\u30b9\")\n    exp = [s[0]]\n    for i in range(len(opr)):\n        if opr[i] == \"\u30ef\u30f3\u30d4\u30fc\u30b9\":\n            exp[-1] += s[i + 1]\n        elif opr[i] == \"\u6c34\u7740\":\n            exp.append(s[i + 1])\n    ans += sum(list(map(int, exp)))\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "S = input()\nans = 0\n\nfor i in range(0,2**(len(S)-1)):\n  tmp = S\n  cnt = 0\n  for j in range(0,len(S)):\n    if ( i >> j ) & 1:\n      cnt += 1\n      tmp = tmp[0:j+cnt] + '+' + tmp[j+cnt:]\n  ans += eval(tmp)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "S = input()\n\nn = len(S)\n\ndef dfs(i,f):\n    if i == n-1:\n        return sum(list(map(int, f.split(\"+\"))))\n\n    return dfs(i+1, f+S[i+1]) + dfs(i+1, f+\"+\"+S[i+1])\nprint(dfs(0, S[0]))", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "s = input()\nnums = []\n\nf = \"0\"+str(len(s)-1)+\"b\"\n\nfor i in range(2**(len(s)-1)):\n    m = format(i, f)\n\n    l = 0\n    r = 0\n    while r < len(m):\n        if m[r] == \"1\":\n            nums.append(s[l:r+1])\n            l = r+1\n        r += 1\n\n    nums.append(s[l:r+1])\n\nprint(sum(map(int, nums)))", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "n = input()\nopr = len(n) - 1\ncal_sum = 0\nfor i in range(2**opr):\n  op = [\"\"] * opr\n  for j in range(opr):\n    if((i>>j)&1):\n      op[opr-1-j] = \"+\"\n  cal = \"\"\n  for x,y in zip(n,op+[\"\"]):\n    cal += x+y\n  cal_sum += eval(cal)\nprint(cal_sum)", "passed": true, "time": 0.15, "memory": 14340.0, "status": "done"}, {"code": "def dfs(i,sall):\n    if i == lenS:\n        return (sall)\n        #return sum(map(int,(s[0]+sall).split(\"+\")))\n    return dfs(i + 1,sall+\"+\"+s[i])+\"+\"+dfs(i + 1,sall+s[i])\n\ns = input()\nlenS = len(s)\nprint(sum(map(int,dfs(1,s[0]).split(\"+\"))))", "passed": true, "time": 0.16, "memory": 14244.0, "status": "done"}, {"code": "# n-1\u7b87\u6240\u306b+\u3092\u3044\u308c\u308b\u304b\u3044\u308c\u306a\u3044\u304b\u306a\u306e\u3067bit\u5168\u63a2\u7d22\u304c\u53ef\u80fd\ns = list(input())\nans = 0\nfor bit in range(1 << len(s) - 1):\n    a = [int(s[0])]\n    for i in range(len(s) - 1):\n        if (bit >> i) & 1 == 1:\n            a.append(int(s[i + 1]))\n        else:\n            a[-1] = 10 * a[-1] + int(s[i + 1])\n    ans += sum(a)\nprint(ans)\n", "passed": true, "time": 0.28, "memory": 14116.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\nans = 0\n\nfor i in range(2**(n-1)):\n  f = s[0]\n  \n  for j in range(n-1):\n    if i & (1<<j):\n      f += '+'\n    f += s[j+1]\n    \n  ans += sum(map(int, f.split('+')))\n  \nprint(ans)", "passed": true, "time": 0.22, "memory": 14064.0, "status": "done"}, {"code": "def dfs(i, f):\n    if i == n-1: #\u3082\u3057\u679d\u304c\u6700\u5f8c\u306e\u3051\u305f\u306b\u5230\u9054\u3057\u305f\u3089\u3001\u3068\u3044\u3046\u6761\u4ef6\u5f0f\n        return sum (list(map(int, f.split('+'))))\n    \n    #\u5f0ff\u306e\u672b\u5c3e\u306b'+'\u3092\u8ffd\u52a0\u3059\u308b/\u8ffd\u52a0\u3057\u306a\u3044\u3092\u3057\u3066\u6b21\u306e\u6570\u5b57\u3092\u8ffd\u52a0\n    return dfs(i+1, f+s[i+1]) + dfs(i+1, f+'+'+s[i+1])\ns = input()\nn = len(s)\nprint((dfs(0, s[0])))\n", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "S = list(input())\nN = len(S)-1\nans = 0\nfor i in range(1 << N):\n    a = S[0]\n    for j in range(N):\n        if(i >> j) & 1 == 0:\n            a += S[j+1]\n        else:\n            x = int(a)\n            ans += x\n            a = S[j+1]\n    x = int(a)\n    ans += x\nprint(ans)\n", "passed": true, "time": 0.29, "memory": 14108.0, "status": "done"}, {"code": "S = input()\nn = len(S)\n\nans = 0\n\nfor i in range(2**(n-1)):\n    t = S[0]\n    for j in range(n-1):\n        if (i>>j)&1:\n            t += \"+\"\n        t += S[j+1]\n    ans += eval(t)\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14292.0, "status": "done"}, {"code": "a = input()\n\nn = len(a)\nans = 0\nfor i in range(2**(n-1)):\n    f = a[0]\n    for j in range(n-1):\n        if ((i >> j) & 1):\n            f += '+'\n        f += a[j+1]\n\n    ans += sum(map(int, f.split('+')))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "from itertools import product\n\nS = list(input())\nN = len(S)\n\nans = 0\nfor adds in product([0, 1], repeat=N - 1):\n    eqn = [\"\"] * (2 * N - 1)\n    eqn[::2] = S[:]\n    for i, has_add in enumerate(adds):\n        if has_add:\n            eqn[2 * i + 1] = \"+\"\n        else:\n            eqn[2 * i + 1] = \"\"\n    ans += eval(\"\".join(eqn))\nprint(ans)\n", "passed": true, "time": 0.15, "memory": 14140.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\ndef dfs(i, tmp):\n    if i == n-1:\n        return sum(list(map(int,tmp.split(\"+\"))))\n    \n    return dfs(i+1, tmp + s[i+1]) + dfs(i+1, tmp + \"+\" + s[i+1])\n\nprint(dfs(0,s[0]))", "passed": true, "time": 0.15, "memory": 14108.0, "status": "done"}, {"code": "s = input()\n\nans = 0\n\nfor i in range(1<<(len(s)-1)):\n    t = list(s)\n    for b in range(len(s)-1):\n        if((i>>b)&1):\n            t[b] = t[b] + '+'\n    ans += eval(''.join(t))\nprint(ans)\n\n\n\n\n\n", "passed": true, "time": 0.21, "memory": 14176.0, "status": "done"}, {"code": "import sys\n\nsys.setrecursionlimit(10 ** 6)\nint1 = lambda x: int(x) - 1\np2D = lambda x: print(*x, sep=\"\\n\")\ndef II(): return int(sys.stdin.readline())\ndef MI(): return map(int, sys.stdin.readline().split())\ndef LI(): return list(map(int, sys.stdin.readline().split()))\ndef LLI(rows_number): return [LI() for _ in range(rows_number)]\ndef SI(): return sys.stdin.readline()[:-1]\n\ns=SI()\nans=0\nfor b in range(1<<(len(s)-1)):\n    f=\"\"\n    for i,c in enumerate(s):\n        f+=c\n        if b>>i&1:f+=\"+\"\n    ans+=eval(f)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "S = input()\nans = 0\nfor i in range(2**(len(S)-1)):\n    tmp = int(S[0])\n    for j in range(1, len(S)):\n        if i & 1 == 1:\n            ans += tmp\n            tmp = int(S[j])\n        else:\n            tmp = tmp*10+int(S[j])\n        i = i >> 1\n    ans += tmp\nprint(ans)\n\n\n", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "s = input()\nans = 0\nfor i in range(2**(len(s)-1)):\n    t = 0\n    for j in range(len(s)-1):\n        if (i >> j)&1:\n            ans += int(s[t:j+1])\n            t = j+1\n    ans += int(s[t:])\nprint(ans)", "passed": true, "time": 0.15, "memory": 14136.0, "status": "done"}, {"code": "#from collections import deque,defaultdict\nprintn = lambda x: print(x,end='')\ninn = lambda : int(input())\ninl   = lambda: list(map(int, input().split()))\ninm   = lambda:      map(int, input().split())\nins = lambda : input().strip()\nDBG = True # and False\nBIG = 10**18\nR = 10**9 + 7\n#R = 998244353\n\ndef ddprint(x):\n  if DBG:\n    print(x)\n\ns = ins()\nn = len(s)\nans = 0\nfor i in range(2**(n-1)):\n    z = []\n    head = 0\n    for j in range(n-1):\n        if (i>>j)%2>0:\n            z.append(int(s[head:j+1]))\n            head = j+1\n    z.append(int(s[head:]))\n    ans += sum(z)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "def dfs(i,sum1):\n    nonlocal ss\n    #print(i,sum1)\n    if i == len(s):\n        return sum(list(map(int,sum1.split(\"+\"))))\n    return dfs(i + 1, sum1 + s[i]) + dfs(i + 1, sum1 + \"+\" +s[i])\n\n\ns = input()\nss = 0\nprint(dfs(1,s[0]))", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "def dfs(i,sum1):\n    if i == len(s):\n        return sum(list(map(int,sum1.split(\"+\"))))\n    return dfs(i+1,sum1 + \"+\" + s[i])+dfs(i+1,sum1 + s[i])\ns = input()#\u4e00\u4ee5\u4e0a9\u4ee5\u4e0b\nprint(dfs(1,s[0]))", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "s=input()\nimport itertools\nl=[*itertools.accumulate(s)]\no=[]\nfor b in range(1<<len(s)-1):\n  q=[]\n  p=0\n  for i in range(len(s)-1):\n    if b&(1<<i):\n      q+=int(l[i][p::]),\n      p=i+1\n  c=l[-1][p::]\n  c=c if c else 0\n  q+=int(c),\n  o+=sum(q),\nprint(sum(o))", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\nans = 0\n\nfor i in range(2**(n-1)):\n  f = s[0]\n  for j in range(n-1):\n    if i & (1<<j):\n      f += '+'\n    f += s[j+1]\n    \n  ans += sum(map(int, f.split('+')))\n  \nprint(ans)", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "from itertools import product\n\nS=input()\nN=len(S)\nS2=S[0]\nfor i in range(N-1):\n  S2 += '{}'+S[i+1]\n\nans=0\nfor p in product(['','+'],repeat=N-1):\n  ans += eval(S2.format(*p))\n  \nprint(ans)", "passed": true, "time": 0.15, "memory": 14344.0, "status": "done"}, {"code": "S = input()\nn = len(S)\n\nans = 0\nfor bit in range(1 << (n-1)):\n    tmp = S[0]\n    for i in range(n-1):\n        if bit & (1 << i):\n            tmp += \"+\"\n        tmp += S[i+1]\n    \n    ans += sum(map(int, tmp.split(\"+\")))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "from functools import reduce\n\ndef original_sum(X, init):\n    goukei = 0\n    if(len(X) == 0):\n        #print(\"aaa\")\n        #print(sum(init))\n        return sum(init)\n    else:\n        for i in range(len(X)):\n            lstm = init.copy()\n            #print(len(X))\n            num = int(reduce(lambda x, y: x + y, [str(x) for x in X[0:i+1]]))\n            #print(num)\n            #init = num\n            lstm.append(num)\n            Y = X[i+1:len(X)].copy()\n            #print(len(Y))\n            #if(len(X)-i-1 != 0):\n            goukei = goukei + original_sum(Y, lstm)\n            #else:\n                #sum = sum + (len(X)-i-1)num + original_sum(Y)\n            #print(sum)\n\n    return goukei\n\n\nnumber = list(input())\ninit = []\nprint(original_sum(number, init))", "passed": true, "time": 0.21, "memory": 14228.0, "status": "done"}, {"code": "num = int(input())\n\ndef the_algorithm(num):\n    ary = list(str(num))\n    sum = 0\n\n    for bit in range(1 << (len(ary) - 1)):\n        tmp = [ary[0]]\n        for i in range((len(ary) - 1)):\n            mask = 1 << i\n\n            if bit & mask:\n                tmp.append(ary[i + 1])\n            else:\n                tmp[-1] = tmp[-1] + ary[i + 1]\n\n        for i in tmp:\n            sum += int(i)\n\n    return sum\n\nprint(the_algorithm(num))", "passed": true, "time": 0.52, "memory": 14104.0, "status": "done"}, {"code": "import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef ii(): return int(input())\ndef mi(): return map(int, input().split())\ndef li(): return list(mi())\n\n\ndef main():\n    s= input()\n    n = len(s)\n    ans = 0\n    for i in range(1<<(n-1)):\n        idx = [0]\n        for j in range(n-1):\n            if (i>>j)&1:\n                idx.append(j+1)\n        idx.append(n)\n        for j in range(1, len(idx)):\n            ans += int(s[idx[j-1]:idx[j]])\n    print(ans)\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.16, "memory": 14096.0, "status": "done"}, {"code": "from itertools import product\ns=input()\nn=len(s)\nans=0\nfor p in product([0,1], repeat=n-1):\n  wk=s[0]\n  index=0\n  for i in p:\n    index+=1\n    if i==0:\n      wk+=s[index]\n    else:\n      ans+=int(wk)\n      wk=s[index]\n  if wk!=\"\":\n    ans+=int(wk)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "S = input()\nn = len(S)-1\nresult = 0\nfor i in range(2 ** n):\n    sum = 0\n    temp = ''\n    for j in range(n):\n        temp += S[j]\n        if (i >> j) & 1:\n            sum += int(temp)\n            temp = ''\n    sum += int(temp+S[-1])\n    result += sum\nprint(result)", "passed": true, "time": 0.24, "memory": 14188.0, "status": "done"}, {"code": "ss=input()\nl=len(ss)-1\nans=0\nfor i in range(2**l):\n    s=ss\n    for j in reversed(range(l)):\n        if i&(2**j)>0:\n            s=s[:j+1]+\" \"+s[j+1:]\n    num=list(map(int,s.split(\" \")))\n    ans+=sum(num)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14332.0, "status": "done"}, {"code": "class Combination:\n    def __init__(self, n, mod):\n        self.n = n\n        self.mod = mod\n        self.fac = [1 for i in range(self.n + 1)]\n        self.finv = [1 for i in range(self.n + 1)]\n        for i in range(2, self.n+1):\n            self.fac[i] = (self.fac[i - 1] * i) % self.mod\n            self.finv[i] = (self.finv[i-1] * pow(i, -1, self.mod)) % self.mod\n\n    def comb(self, n, m):\n        return self.fac[n] * (self.finv[n-m] * self.finv[m] % self.mod) % self.mod\ndef iparse():\n    return list(map(int, input().split()))\n\ndef __starting_point():\n    s = input()\n    ans = 0\n    for i in range(1 << (len(s) - 1)):\n        prev = 0\n        for j in range(len(s) - 1):\n            if (i >> j) & 1 == 1:\n                tmp = s[prev:j + 1]\n                ans += int(tmp)\n                prev = j+1\n        ans += int(s[prev:])\n    print(ans)\n            \n        \n    \n\n__starting_point()", "passed": true, "time": 0.19, "memory": 14376.0, "status": "done"}, {"code": "\nn = str(input())\n\nlen_n = len(n)-1\n\nans = 0\ntotal = 0\n\nfor i in range(2**len_n):\n    temp = n[0]\n    for j in range(len_n):\n        if (i >> j) & 1:\n            temp += '+'\n        temp += n[j+1]\n    total = list(map(int, temp.split('+')))\n    ans += sum(total)\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "S=input()\nl=len(S)\nls=[i for i in range(1,l)]\n    \nimport itertools as it\na=0\nfor i in range(l):\n for j in it.combinations(ls, i):\n  t='';p=0\n  for k in j:\n    t+=S[p:k]+'+'\n    p=k\n  t+=S[p:]\n  a+=eval(''.join(t))\nprint(a)", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "S=input()\nN=len(S)\n\nans=2**(N-1)*int(S[-1])\nfor i in range(1<<(N-1)):\n    res=1\n    for j in range(N-1):\n        if (i>>j)%2==1:\n            res*=10\n        else:\n            res=1\n        ans+=res*int(S[N-2-j])\nprint(ans)\n", "passed": true, "time": 0.26, "memory": 14224.0, "status": "done"}, {"code": "s = input()\nn = len(s) - 1\n\nans = 0\nfor i in range(2 ** n):\n    first = ''\n    for j in range(n):\n        if ((i >> j) & 1):\n            ans += int(first + s[j])\n            first = ''\n        else:\n            first += s[j]\n    ans += int(first + s[-1])\nprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "S = input()\nans = 0\nfor i in range(2**(len(S)-1)):\n    ls = []\n    index = 0\n    for j in range(len(S)-1):\n        if ((i >> j) & 1):\n            ls.append(int(S[index:j+1]))\n            index = j+1\n    ls.append(int(S[index:]))\n    ans += sum(ls)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14352.0, "status": "done"}, {"code": "s = input()\nn = len(s)\n\ndef dfs(i,tmp):\n    if i == n-1:\n        return sum(list(map(int,tmp.split(\"+\"))))\n    \n    return dfs(i+1, tmp+s[i+1]) + dfs(i+1,tmp+\"+\"+s[i+1])\n\nprint(dfs(0,s[0]))", "passed": true, "time": 0.16, "memory": 14104.0, "status": "done"}, {"code": "from itertools import product\ns = input()\nn = len(s)\nans = 0\nfor lst in product(['x', ' '], repeat=n-1):\n    ss = ''\n    for i in range(n-1):\n        ss += (s[i] + str(lst[i]))\n    ss += s[-1]\n    ss = ss.replace('x', '')\n    temp = [int(x) for x in ss.split()]\n    ans += sum(temp)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "import math\nimport collections\nfrom itertools import product\n\nii = lambda : int(input())\nmi = lambda : map(int,input().split())\nli = lambda : list(map(int,input().split()))\n\ns = list(input())\nn = len(s)\nans = 0\nfor p in product((0,1), repeat=n):\n    total = 0\n    for i in range(n):\n        if p[i] == 1:\n            ans += total\n            total = 0\n        else:\n            total = total*10 + int(s[i])\n    ans += total\nprint(ans)", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "def cal():\n    s = input()\n    num, ans = len(s)-1, 0\n    for i in range(2**num):\n        count0, count1 = 0, 0\n        for j in range(num):\n            count1 += 1\n            if (i>>j)&1:\n                ans += int(s[count0:count1])\n                count0 = count1\n        ans += int(s[count0:count1+1])\n    print(ans)\ncal()\n\n", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "import itertools\nn = input()\nl = len(n)\nans = 0\nfor ope in itertools.product(\"_+\", repeat = l - 1):\n    num = n[0]\n    for i in range(l - 1):\n        if ope[i] == \"+\":\n            num += n[i + 1]\n        else:\n            ans += int(num)\n            num = n[i + 1]\n    ans += int(num)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "s = input()\nn = len(s)\nans = 0\n\nfor bit in range(1 << (n-1)):#n-1\u500b+\u3092\u5165\u308c\u308b\u5834\u6240\u304c\u3042\u308b\u3002\n    f = s[0]\n\n    for i in range(n-1):\n        if bit & (1<<i):\n            f += \"+\"  #\u30d5\u30e9\u30b0\u304c\u7acb\u3063\u3066\u3044\u308b\u306e\u306a\u3089\uff0b\u3092\u633f\u5165\n        f +=s[i+1]\n\n    ans += sum(map(int, f.split(\"+\")))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "s = input()\nn = len(s)\nans = 0\nfor i in range(n):\n    a = int(s[i])\n    for j in range(n-i):\n        ans += a * 10**j * 2**(max(0,n-i-j-2)) * 2**(i)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14352.0, "status": "done"}, {"code": "import itertools\ns = input()\nn = len(s)-1\nans = 0\nfor v in itertools.product([\"+\", \"\"], repeat=n):\n    x = s[0]\n    for i in range(n):\n        x += v[i] + s[i+1]\n    ans += eval(x)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "S = input()\nL = []\nfor i in range(len(S)):\n    L.append(S[i])\n\nn = len(S)\nans = []\nfor i in range(2 ** (n - 1)):\n    obj = []\n    for j in range(n - 1):\n        if (i >> j) & 1:\n            obj.append(j)\n        else:\n            obj.append(-1)\n    # print(obj)\n    s = ''\n    s += L[0]\n    for j in range(len(obj)):\n        if obj[j] == -1:\n            s += L[j + 1]\n            continue\n        else:\n            s += '+'\n            s += L[j + 1]\n    # print(s)\n    idx = 0\n    now = 0\n\n    while True:\n        if now == len(s) - 1:\n            ans.append(int(s[idx:]))\n            break\n        if s[now] == '+':\n            ans.append(int(s[idx:now]))\n            idx = now + 1\n            now = idx\n        else:\n            now += 1\nprint((sum(ans)))\n", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "s=input()\nans=0\nfor i in range(2**(len(s)-1)):\n    num=s[0]\n    for j in range(len(s)-1):\n        if (i>>j) & 1:\n            ans+=int(num)\n            num=\"\"\n        num+=s[j+1]\n    if len(num)!=0:\n        ans+=int(num)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}]