cswork / OAOpen practice workspace

Pure StorageOA #10

Bakery Quality Control

Estimated EasyJudge-ready

Topics (AI-labelled)HashingStrings

Compare each pair consisting of a box item string box and a template string template. The order of characters does not matter, but the count of each item must match; return the number of mismatched boxes.

Input

The first line contains n, followed by n lines, each containing two strings box and template that consist only of lowercase a-z and contain no spaces. 0≤n≤1000, and each string has length 1..10.

Output

Output the number of mismatched pairs.

Example 1

Input:

3
pcm mcp
ddp dpd
cc c

Output:

1

Example 2

Input:

2
abc cab
aab abb

Output:

1

Example 3

Input:

1
z z

Output:

0

Editorial

Loading solution…