#include <stdio.h> #include <string.h> int main() { int result = 0; char s1[20]; char s2[20]; scanf("%s%s", &s1, &s2); int l1 = strlen(s1); int l2 = strlen(s2); for (int i = 0; i < l1; i++) { char temp1 = s1[i]; for (int j = 0; j < l2; j++) { char temp2 = s2[j]; result += (temp1 - '0') * (temp2 - '0'); } } printf("%lld", result); }