execute at @s store result score #Paper nl.Count run data get block ~ ~ ~ Items.[{Slot:26b}].Count
execute at @s if score #Paper nl.Count matches ..1 run replaceitem block ~ ~ ~ container.26 air
execute at @s if score #Paper nl.Count matches 2.. run scoreboard players remove #Paper nl.Count 1 
execute at @s store result block ~ ~ ~ Items.[{Slot:26b}].Count double 1 run scoreboard players get #Paper nl.Count 