#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ abs(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char A[10000];
  char B[10000];
  scanf("%s", A);
  scanf("%s", B);
  int letterA[26] = {0};
  int letterB[26] = {0};
  for (int i = 0; i < strlen(A); i++) {
    char c = A[i];
    letterA[c - 'a']++;
  }
  for (int i = 0; i < strlen(B); i++) {
    char c = B[i];
    letterB[c - 'a']++;
  }
  int count = 0;
  for (int i = 0; i < 26; i++) {
    count += abs(letterB[i] - letterA[i]);
  }
  printf("%d", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4f30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x4e30(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x4ea0(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1060 <memset@plt>
lea    -0x4f10(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1060 <memset@plt>
movl   $0x0,-0x4f14(%rbp)
mov    -0x4f14(%rbp),%eax
mov    %eax,-0x4f2c(%rbp)
lea    -0x2720(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x4f2c(%rbp),%eax
cmp    %ecx,%eax
jge    1225 <main+0xd5>
movslq -0x4f14(%rbp),%rax
mov    -0x2720(%rbp,%rax,1),%al
mov    %al,-0x4f15(%rbp)
movsbl -0x4f15(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x4ea0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4ea0(%rbp,%rax,4)
mov    -0x4f14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4f14(%rbp)
jmp    11b8 <main+0x68>
movl   $0x0,-0x4f1c(%rbp)
mov    -0x4f1c(%rbp),%eax
mov    %eax,-0x4f30(%rbp)
lea    -0x4e30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x4f30(%rbp),%eax
cmp    %ecx,%eax
jge    129c <main+0x14c>
movslq -0x4f1c(%rbp),%rax
mov    -0x4e30(%rbp,%rax,1),%al
mov    %al,-0x4f1d(%rbp)
movsbl -0x4f1d(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x4f10(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4f10(%rbp,%rax,4)
mov    -0x4f1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4f1c(%rbp)
jmp    122f <main+0xdf>
movl   $0x0,-0x4f24(%rbp)
movl   $0x0,-0x4f28(%rbp)
cmpl   $0x1a,-0x4f28(%rbp)
jge    1305 <main+0x1b5>
movslq -0x4f28(%rbp),%rax
mov    -0x4f10(%rbp,%rax,4),%edi
movslq -0x4f28(%rbp),%rax
sub    -0x4ea0(%rbp,%rax,4),%edi
call   1030 <abs@plt>
mov    %rax,%rcx
movslq -0x4f24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4f24(%rbp)
mov    -0x4f28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4f28(%rbp)
jmp    12b0 <main+0x160>
mov    -0x4f24(%rbp),%esi
lea    0xcf1(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x4f30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x4f00,%rsp
lea    0xead(%rip),%rbx
lea    0x27f0(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0xe0(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movq   $0x0,0xd0(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x60(%rsp)
mov    %r14,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1214 <main+0xd4>
xor    %ebx,%ebx
lea    0x27f0(%rsp),%r14
xchg   %ax,%ax
movsbq 0x27f0(%rsp,%rbx,1),%rax
addl   $0x1,-0x114(%rsp,%rax,4)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     11f0 <main+0xb0>
lea    0xe0(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1254 <main+0x114>
xor    %ebx,%ebx
lea    0xe0(%rsp),%r14
nop
movsbq 0xe0(%rsp,%rbx,1),%rax
addl   $0x1,-0x184(%rsp,%rax,4)
01
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1230 <main+0xf0>
xor    %r15d,%r15d
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    -0x4(%rsp,%rbx,4),%edi
sub    0x6c(%rsp,%rbx,4),%edi
call   1030 <abs@plt>
mov    %rax,%r14
add    %r15d,%r14d
mov    (%rsp,%rbx,4),%edi
sub    0x70(%rsp,%rbx,4),%edi
call   1030 <abs@plt>
mov    %rax,%r15
add    %r14d,%r15d
add    $0x2,%rbx
cmp    $0x1b,%rbx
jne    1260 <main+0x120>
lea    0xd6d(%rip),%rdi
mov    %r15d,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x4f00,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10000 x i8]
%3 = alloca [10000 x i8]
%4 = alloca [26 x i32]
%5 = alloca [26 x i32]
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = bitcast [26 x i32]* %4 to i8*
%17 = bitcast [26 x i32]* %5 to i8*
store i32 0, i32* %6
br label %18
18: ; preds = %35, %0
%19 = load i32, i32* %6
%20 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%21 = call i32 @strlen(i8* %20)
%22 = icmp slt i32 %19, %21
br i1 %22, label %23, label %38
23: ; preds = %18
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 97
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 1
store i32 %34, i32* %32
br label %35
35: ; preds = %23
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %18
38: ; preds = %18
store i32 0, i32* %8
br label %39
39: ; preds = %56, %38
%40 = load i32, i32* %8
%41 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%42 = call i32 @strlen(i8* %41)
%43 = icmp slt i32 %40, %42
br i1 %43, label %44, label %59
44: ; preds = %39
%45 = load i32, i32* %8
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 %46
%48 = load i8, i8* %47
store i8 %48, i8* %9
%49 = load i8, i8* %9
%50 = sext i8 %49 to i32
%51 = sub nsw i32 %50, 97
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [26 x i32], [26 x i32]* %5, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = add nsw i32 %54, 1
store i32 %55, i32* %53
br label %56
56: ; preds = %44
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
br label %39
59: ; preds = %39
store i32 0, i32* %10
store i32 0, i32* %11
br label %60
60: ; preds = %78, %59
%61 = load i32, i32* %11
%62 = icmp slt i32 %61, 26
br i1 %62, label %63, label %81
63: ; preds = %60
%64 = load i32, i32* %11
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [26 x i32], [26 x i32]* %5, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = load i32, i32* %11
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = sub nsw i32 %67, %71
%73 = call i64 @abs(i32 %72)
%74 = load i32, i32* %10
%75 = sext i32 %74 to i64
%76 = add nsw i64 %75, %73
%77 = trunc i64 %76 to i32
store i32 %77, i32* %10
br label %78
78: ; preds = %63
%79 = load i32, i32* %11
%80 = add nsw i32 %79, 1
store i32 %80, i32* %11
br label %60
81: ; preds = %60
%82 = load i32, i32* %10
%83 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %82)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10000 x i8]
%2 = alloca [10000 x i8]
%3 = alloca [26 x i32]
%4 = alloca [26 x i32]
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%9 = bitcast [26 x i32]* %3 to i8*
%10 = bitcast [26 x i32]* %4 to i8*
%11 = call i32 @strlen(i8* %5)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %17, %0
%14 = call i32 @strlen(i8* %6)
%15 = icmp sgt i32 %14, 0
br i1 %15, label %30, label %16
16: ; preds = %30, %13
br label %45
17: ; preds = %0, %17
%18 = phi i64 [ %26, %17 ], [ 0, %0 ]
%19 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i64
%22 = add nsw i64 %21, -97
%23 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
store i32 %25, i32* %23
%26 = add nuw nsw i64 %18, 1
%27 = call i32 @strlen(i8* %5)
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %26, %28
br i1 %29, label %17, label %13
30: ; preds = %13, %30
%31 = phi i64 [ %39, %30 ], [ 0, %13 ]
%32 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i64
%35 = add nsw i64 %34, -97
%36 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = add nsw i32 %37, 1
store i32 %38, i32* %36
%39 = add nuw nsw i64 %31, 1
%40 = call i32 @strlen(i8* %6)
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %39, %41
br i1 %42, label %30, label %16
43: ; preds = %45
%44 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %64)
ret i32 0
45: ; preds = %45, %16
%46 = phi i64 [ 0, %16 ], [ %65, %45 ]
%47 = phi i32 [ 0, %16 ], [ %64, %45 ]
%48 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %46
%49 = load i32, i32* %48
%50 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 %46
%51 = load i32, i32* %50
%52 = sub nsw i32 %49, %51
%53 = call i64 @abs(i32 %52)
%54 = trunc i64 %53 to i32
%55 = add i32 %47, %54
%56 = or i64 %46, 1
%57 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = getelementptr inbounds [26 x i32], [26 x i32]* %3, i64 0, i64 %56
%60 = load i32, i32* %59
%61 = sub nsw i32 %58, %60
%62 = call i64 @abs(i32 %61)
%63 = trunc i64 %62 to i32
%64 = add i32 %55, %63
%65 = add nuw nsw i64 %46, 2
%66 = icmp eq i64 %65, 26
br i1 %66, label %43, label %45
}