Custom Price Rule

We wanted to implement the following price rule for one item, From the price rule configuration, we are not able to configure this rule.

Item Price: 100 per each, if quantity is >5 then cost will be 50 each
If the customer buy 5 quantity then the price will be 500
If the customer buy 7 quantity then the price will be 500 +100 (2*50)= 600

From the price rule, we can apply the quantity base rule but it is not working as expected. If the customer is ordering 7 quantity then the existing erpnext price rule will count 7*50 = 350 instead of 600

Can anyone help here?