contract Administrator is Ownable {
    mapping (address=>bool) public admin;
    
    // Current number of members of the administrator group
    uint    public   adminLength;   
    // The maximum number of members of the administrator group, which is specified in the constructor
    uint    public   adminMaxLength;      
    
    event   AddAdmin(address indexed _address);
    event   RemoveAdmin(address indexed _address);
    
    constructor (uint _len) public {        
        adminMaxLength = _len;
    }
    
    modifier isAdmin(address _addr) {
        require(admin[_addr], "Not administrator");
        _;
    }
    
    modifier isNotAdmin(address _addr) {
        require(!admin[_addr], "Is administrator");
        _;        
    }
    
    /**
     * @dev Modifier: Limit that only the contract owner or administrator can execute the function
    */
	modifier onlyOwnerOrAdmin() {
		require(msg.sender == owner || admin[msg.sender], "msg.sender is nether owner nor administator");
		_;
	}
    
    /**
     * @dev Add a member to the Administrators group
    */
    function addAdmin(address _addr) onlyOwner isNotAdmin(_addr) public returns (bool) {
        require(_addr != address(0), "Administrator cannot be address(0)");
        require(_addr != owner, "Administrator cannot be owner");
        require(adminLength < adminMaxLength, "Exceeded the maximum number of administrators");
        
        admin[_addr] = true;
        adminLength++; 
        
        emit AddAdmin(_addr);
        return true;
    } 
    
    /**
     * @dev Remove a member from the Administrators group
    */
    function removeAdmin(address _addr) onlyOwner isAdmin(_addr) public returns (bool) {
        delete admin[_addr];
        adminLength--;
        
        emit RemoveAdmin(_addr);
        return true;
    }
}
/**
 * @title Administator
 * @dev  This contract has a group of administrators who can add/remove any account to/from blacklist. 
 */
function removeAdmin(address _addr) onlyOwner isAdmin(_addr) public returns (bool) {
    delete admin[_addr];
    adminLength--;
        
    emit RemoveAdmin(_addr);
    return true;
}

/**
 * @dev Remove a member from the Administrators group
 */