#P4020. John's Inversions

John's Inversions

Description

Input

Output

Source