George is a cat, so he loves playing very much.
Vitaly put n cards in a row in front of George. Each card has one integer written on it. All cards had distinct numbers written on them. Let's number the cards from the left to the right with integers from 1 to n. Then the i-th card from the left contains number pi (1≤pi≤n).
Vitaly wants the row to have exactly k cards left. He also wants the i-th card from left to have number bi written on it. Vitaly gave a task to George, to get the required sequence of cards using the remove operation n-k times.
In one remove operation George can choose w (1≤w; w is not greater than the current number of cards in the row) contiguous cards (contiguous subsegment of cards). Let's denote the numbers written on these card as x1,x2,...,xw (from the left to the right). After that, George can remove the card xi, such that xi≤xj for each j (1≤j≤w). After the described operation George gets w pieces of sausage.
George wondered: what maximum number of pieces of sausage will he get in total if he reaches his goal and acts optimally well? Help George, find an answer to his question!
Output
Print a single integer − the maximum number of pieces of sausage that George can get if he acts optimally well.