import scala.math.pow

object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var s = sc.next()
  var t = sc.next()
  for(i <- 0 until s.length){
    s = s.diff(t(i).toString)
  }
  println(s.length)
}
