# Vinnis’ Friends

Vinni Puh decided to play with his friends to one interesting game. Vinni took stone and decomposed them to a row to M heaps. Each of Vinnis’ friends approached and took the left heap of stones and placed all stones of this heap to all another heaps by one stone. If the quantity of the heaps of stones less than quantity of stones in the heap which took friend, then stones which remained form a new heap. It continues until the last Vinnis’ friend does not do his step. On the field remains N heaps of stone after the finish of game. Consider the example of the game:

Initial state 7 5 1 3 6 Friend #1 6 2 4 7 1 1 1 Friend #2 3 5 8 2 2 2 Friend #3 6 9 3 2 2

Your task is, if you know the initial location of stones on heaps and eventual state you have to define the quantity of Vinnis’ friends.

## Input

There are two numbers in the first line – M and N (2 ≤ M, N ≤ 1000), M is a quantity of the heaps of stones in the initial state, N is a quantity of heaps of stone after the finish of game. There are M integers (initial state) in the second line, Mi is a quantity of stones in a heap with number і (1 ≤ Mi ≤ 100). There are N integers (1 ≤ N, i ≤ 100) in the third line accordingly.

## Output

You have to write down one number - quantity of Vinnis’ friends.