Adafruit Fingerprint Program Notification for 3 Consecutive Unmatched finger ID

Hello there… I just want to add a program that will notify if there are 3 consecutive unmatched fingerprint detected in the system…

The code below is just a part of my program where I believe the code will be added. Thanks for the help. I really appreciate all the help I can get since this will be my final project.

int getFingerprintIDez()
{
  uint8_t p = finger.getImage();
  
  if (p != FINGERPRINT_OK)  
  return -1;
  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  
  return -1;
  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)
  {
   lcd.clear();
   lcd.print("Finger Not Found");
   lcd.setCursor(0,1);
   lcd.print("Try Later");
   delay(2000);  
  return -1;
  }
  // found a match!
  Serial.print("Found ID #"); 
  Serial.print(finger.fingerID); 
  return finger.fingerID;