<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2024"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2024"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2024/ffd-2024.xsd"
      xlink:type="simple"/>
    <context id="c_report">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000927971</identifier>
        </entity>
        <period>
            <startDate>2024-12-11</startDate>
            <endDate>2024-12-11</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="pure">
        <measure>pure</measure>
    </unit>
    <unit id="shares">
        <measure>shares</measure>
    </unit>
    <ffd:SubmissnTp contextRef="c_report" id="ixv-21">424B2</ffd:SubmissnTp>
    <ffd:FeeExhibitTp contextRef="c_report" id="ixv-22">EX-FILING FEES</ffd:FeeExhibitTp>
    <dei:EntityCentralIndexKey contextRef="c_report" id="ixv-23">0000927971</dei:EntityCentralIndexKey>
    <ffd:RegnFileNb contextRef="c_report" id="ixv-24">333-264388</ffd:RegnFileNb>
    <ffd:FormTp contextRef="c_report" id="ixv-40">F-3</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="c_report" id="ixv-12">BANK OF MONTREAL /CAN/</dei:EntityRegistrantName>
    <ffd:NrrtvMaxAggtAmt
      contextRef="c_report"
      decimals="0"
      id="ixv-41"
      unitRef="shares">42801450</ffd:NrrtvMaxAggtAmt>
    <ffd:FnlPrspctsFlg contextRef="c_report" id="ixv-16">true</ffd:FnlPrspctsFlg>
    <ffd:NrrtvDsclsr contextRef="c_report" id="ixv-42">* Calculated in accordance with Rule 457(c), based on the average of the high and low prices reported on the consolidated reporting system on December 9, 2024.</ffd:NrrtvDsclsr>
</xbrl>
