sample input
counting inversions