```\nfunction getBNBAmountOut(uint256 amountIn) public view returns (uint256) {\n    uint256 beansBefore = liqConst / _balances[address(this)];\n    uint256 beansAfter = liqConst / (_balances[address(this)] + amountIn);\n    return beansBefore - beansAfter;\n}\n```\n