N \leq 30000