<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  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/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="c0">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000895421</identifier>
        </entity>
        <period>
            <startDate>2026-06-09</startDate>
            <endDate>2026-06-09</endDate>
        </period>
    </context>
    <unit id="usd">
        <measure>iso4217:USD</measure>
    </unit>
    <ffd:NrrtvDsclsr contextRef="c0" id="ixv-17">&lt;div style="font-family: 'Times New Roman'; font-size: 10pt;"&gt;The pricing supplement to which this Exhibit is
attached is a final prospectus for the related offering. The maximum aggregate
offering price of the related offering is $1,730,100,000. The U.S. dollar
equivalent of the aggregate amount offered has been calculated using an
exchange rate of $1.1534 per Euro 1.00 as of June 8, 2026.&lt;/div&gt;</ffd:NrrtvDsclsr>
    <ffd:FnlPrspctsFlg contextRef="c0" id="ixv-30">true</ffd:FnlPrspctsFlg>
    <ffd:NrrtvMaxAggtOfferingPric contextRef="c0" decimals="INF" id="ixv-31" unitRef="usd">1730100000</ffd:NrrtvMaxAggtOfferingPric>
    <ffd:CombinedProspectusTableNa contextRef="c0" id="ixv-34">N/A</ffd:CombinedProspectusTableNa>
    <dei:EntityCentralIndexKey contextRef="c0" id="ixv-35">0000895421</dei:EntityCentralIndexKey>
    <dei:EntityRegistrantName contextRef="c0" id="ixv-36">MORGAN STANLEY</dei:EntityRegistrantName>
    <ffd:FeeExhibitTp contextRef="c0" id="ixv-37">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:FormTp contextRef="c0" id="ixv-38">S-3</ffd:FormTp>
    <ffd:OfferingTableNa contextRef="c0" id="ixv-39">N/A</ffd:OfferingTableNa>
    <ffd:OffsetTableNa contextRef="c0" id="ixv-40">N/A</ffd:OffsetTableNa>
    <ffd:RegnFileNb contextRef="c0" id="ixv-41">333-293641</ffd:RegnFileNb>
    <ffd:SubmissnTp contextRef="c0" id="ixv-42">424B2</ffd:SubmissnTp>
</xbrl>
