public void Add(int p)
{
if (this.sortedList.Count == 0) {
this.sortedList.Add (p);
return;
}
if (this.sortedList[this.sortedList.Count-1] >= p) {
throw new ArgumentOutOfRangeException ();
}
this.sortedList.Add (p);
if (p+1 > this.N) {
this.N = p + 1;
}
}