This page is still under construction.

Parts of this page are still being built. What you see may change.

MD5 score

Time limit1sMemory limit512 MB

Summary
Concatenate S, #, and P, hash the result with MD5, and print the sum of the hex digits.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

You are given strings SS and PP.

Let AA be the concatenation of SS, the character #, and PP in that order.

Let MM be the MD5 hash of AA. MM is a hexadecimal string of length 3232 that uses the characters 00 through 99 and aa through ff.

The score of MM is the sum of its digits read as hexadecimal values.

If the hash were 20af3 (a real MD5 hash has length 3232; this shorter string is only to show the arithmetic), the score is 216+016+a16+f16+316=2+0+10+15+3=302_{16} + 0_{16} + \mathrm{a}_{16} + \mathrm{f}_{16} + 3_{16} = 2 + 0 + 10 + 15 + 3 = 30.

Print the score of MM.

Input

The first line contains the string SS.

The second line contains the string PP.

SS and PP consist of uppercase letters, lowercase letters, and digits. Each has length from 11 to 1000010000.

Output

Print the score of MM on the first line.

Examples4

  1. Example 1

    Input
    a
    b
    
    Expected output
    236
  2. Example 2

    Input
    0
    0
    
    Expected output
    287
  3. Example 3

    Input
    abc
    xyz
    
    Expected output
    287
  4. Example 4

    Input
    A
    a
    
    Expected output
    264