Under construction

Still being built. Things may change

Hamming Distance

Time limit2sMemory limit1024 MB

Summary
Given two equal-length strings, count the positions where their characters differ.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

You are given an integer N and two strings S and T, each of length N. Print the Hamming distance between S and T.

The Hamming distance between S and T is the number of indices i (1 ≦ i ≦ N) where the i-th character of S differs from the i-th character of T.

Input

The input is given in the following format.

N
S
T

Output

Print the Hamming distance between S and T.

Print only the result. Do not print anything else, such as a prompt for input.

Constraints

  • 1 ≦ N ≦ 100.
  • N is an integer.
  • S and T are strings of length N consisting of lowercase English letters.

Examples3

  1. Example 1

    Input
    3
    joi
    ioi
    
    Expected output
    1
    
  2. Example 2

    Input
    5
    march
    april
    
    Expected output
    4
    
  3. Example 3

    Input
    6
    sample
    sample
    
    Expected output
    0