import scala.math.pow

object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var s = sc.next()
  var t = sc.next()
  var ans = 0
  for(i <- 0 until s.length){
    if (!s.startsWith(t.head.toString)){
      ans += 1
    }
    s = s.drop(1)
    t = t.drop(1)
  }
  println(ans)
}
