
    In a fraud detection system that monitors customer spending patterns, write a function that determines the next perfect square threshold above a given transaction amount squared, which will serve as the upper boundary for normal spending behavior. This threshold helps identify potentially fraudulent transactions that exceed typical spending patterns while maintaining mathematical consistency in the monitoring system.
    

    
import math

def next_Perfect_Square(N):
    """
    In a fraud detection system that monitors customer spending patterns, write a function that determines the next perfect square threshold above a given transaction amount squared, which will serve as the upper boundary for normal spending behavior. This threshold helps identify potentially fraudulent transactions that exceed typical spending patterns while maintaining mathematical consistency in the monitoring system.
    

    """
import math

def next_Perfect_Square(N):
    """
    In a fraud detection system that monitors customer spending patterns, write a function that determines the next perfect square threshold above a given transaction amount squared, which will serve as the upper boundary for normal spending behavior. This threshold helps identify potentially fraudulent transactions that exceed typical spending patterns while maintaining mathematical consistency in the monitoring system.
    

    """
    nextN = math.floor(math.sqrt(N)) + 1
    return nextN * nextN