There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be switched off at that moment) if there's at least one adjacent light which is already switched on. 

He knows the initial state of lights and he's wondering how many different ways there exist to switch all the lights on. Please find the required number of ways modulo 1000000007 (109 + 7).

Input

The first line of the input contains two integers n and m where n is the number of lights in the sequence and m is the number of lights which are initially switched on, (1 ≤ n ≤ 1000, 1 ≤ m ≤ n). The second line contains m distinct integers, each between 1 to n inclusive, denoting the indices of lights which are initially switched on.

Output

In the only line of the output print the number of different possible ways to switch on all the lights modulo 1000000007 (109 + 7).

Examples

Input

3 1
1


Output

1


Input

4 2
1 4


Output

2


Input

11 2
4 8


Output

6720
#include <bits/stdc++.h>
using namespace std;
int finv[] = {
    1,         1,         500000004, 166666668, 41666667,  808333339, 301388891,
    900198419, 487524805, 831947206, 283194722, 571199524, 380933296, 490841026,
    320774361, 821384963, 738836565, 514049213, 639669405, 402087866, 120104394,
    862862120, 130130097, 179570875, 799148792, 791965957, 761229465, 917082579,
    282752951, 699405279, 123313510, 649139150, 957785605, 604781386, 958964165,
    170256120, 671396008, 261389083, 243720767, 211377457, 230284438, 469031331,
    654024560, 317535457, 393580354, 297635121, 202122504, 366002609, 861791727,
    854322286, 57086446,  138374245, 98814890,  662241795, 956708188, 762849245,
    960050886, 16842998,  379600744, 752196628, 279203279, 250478744, 971781922,
    888440989, 92006891,  262953954, 367620517, 856233148, 659650492, 328400734,
    261834298, 102279357, 626420551, 159266036, 785936033, 757145819, 470488764,
    58058296,  590487931, 361904913, 517023815, 623666965, 775898383, 33444559,
    512302915, 711909451, 833859418, 262458156, 412073391, 746203077, 108291146,
    902288920, 444590100, 843490222, 455781814, 720587182, 986672790, 267903845,
    992529638, 545379091, 875453797, 751242122, 732855320, 463425783, 917917562,
    427789694, 494601793, 929856098, 360461633, 462022587, 631472937, 708391653,
    979539218, 150261410, 966230370, 704054182, 781931507, 664802838, 73430533,
    244314544, 735369293, 204424541, 157413317, 90710678,  403957347, 35231659,
    341549460, 435760235, 26841877,  287029784, 832977158, 494908226, 18900820,
    428713543, 234542640, 890626248, 477136961, 324650637, 415396022, 556945299,
    311121040, 775256183, 97008847,  909769299, 860484515, 247313688, 97584341,
    197942752, 622959077, 816261476, 218775078, 61051491,  388559552, 270513463,
    930328016, 535034378, 939327150, 802161325, 87355452,  76021104,  300475134,
    921120970, 141488402, 117432445, 836081911, 411127772, 279585109, 331015482,
    251970332, 113916985, 971258342, 929656488, 889125916, 178549862, 909072132,
    142337556, 23536009,  73579300,  595918989, 327351505, 474040845, 682177026,
    267484491, 181789534, 164031466, 579265039, 169780996, 589143218, 907389066,
    354007352, 970284256, 753771127, 915384231, 880390598, 520002017, 689846169,
    600458403, 815230759, 706137534, 732191651, 538660962, 47456025,  599244836,
    111326330, 657408467, 412962971, 375791085, 784424117, 527809735, 930755077,
    237765502, 688330647, 526831752, 551769167, 745569020, 26723577,  264012611,
    623336468, 599189621, 669402697, 589406380, 862395510, 571452236, 262652254,
    206529699, 414251246, 621302001, 764851556, 933179180, 287917815, 979512693,
    56188367,  340759435, 756827299, 7507809,   544712803, 794680992, 674239165,
    82664871,  130052992, 267208556, 113141945, 12864223,  559723725, 842457890,
    921805957, 885861006, 35975146,  40467642,  554379392, 778217523, 182383338,
    405485651, 139942632, 890314741, 678001239, 811242198, 707436745, 425222626,
    905116696, 126558142, 441097927, 852828624, 326436613, 232297110, 604650182,
    671446058, 10005416,  522425397, 518670730, 38958040,  830402065, 800847072,
    376559882, 110863358, 113130413, 279395402, 246496014, 986498194, 953356631,
    314119133, 22470175,  961072596, 215410152, 155688065, 70721713,  297450078,
    812883107, 541016959, 1872031,   644834046, 476442732, 755056316, 91314186,
    326841207, 285853701, 396235995, 476081606, 270053967, 311939982, 581039804,
    985319076, 135712978, 964144274, 904487323, 678375373, 515288812, 705261532,
    807484621, 122354320, 419749533, 972410777, 211450036, 949557355, 18947635,
    222282375, 48171780,  378700860, 623832397, 478444619, 510870143, 876980910,
    810176965, 748638324, 113421724, 440348993, 863313960, 855851119, 438584915,
    828080811, 720691159, 71663720,  48408626,  843989221, 837856261, 23396586,
    696498209, 699396142, 558282241, 447074582, 748373754, 670816350, 949329879,
    230172975, 253576086, 513778485, 518825953, 716192587, 608379868, 932975307,
    856951364, 238908695, 952383270, 413462845, 749755550, 255633116, 371504590,
    575270325, 736243777, 7621849,   202798951, 842667039, 502327813, 12403107,
    546737375, 494648599, 151624724, 395508517, 384226928, 242233679, 35789821,
    275029085, 239986639, 890723831, 812542048, 364833448, 745651158, 442296160,
    329212426, 335960985, 66673582,  971303612, 458040065, 136966163, 279002518,
    756568843, 351700958, 866541869, 396563255, 517728958, 965430081, 680218496,
    838469951, 144627151, 576509210, 798927877, 640906388, 538138307, 199844570,
    847618664, 622119051, 373122494, 767097325, 617288087, 395092300, 433074305,
    67569149,  815890839, 568176207, 776450314, 850674275, 408395804, 136913583,
    801784300, 794207214, 262154718, 34284026,  400561835, 433972639, 573828101,
    184699592, 812790266, 404769648, 582517190, 392883298, 497395023, 656097176,
    460552924, 608552698, 486267026, 331363414, 476406879, 202491684, 432338321,
    344314146, 993894982, 649068571, 532377735, 925873015, 756095388, 83536581,
    782502356, 467833719, 201958994, 113067476, 982276563, 417000623, 683259514,
    595275137, 339855849, 540755239, 602085936, 629650637, 694546695, 783468170,
    990732904, 300418276, 153830238, 781995268, 886235290, 762796169, 704474617,
    834858176, 120593647, 291208178, 185572492, 867351020, 704212748, 633983365,
    436319797, 679651749, 574691409, 884692149, 583265738, 954817023, 25168036,
    437027667, 13494817,  926806481, 260807531, 473460019, 215121540, 398786562,
    665421923, 247242609, 357210812, 375220601, 951489166, 260146496, 562904189,
    803189606, 115688778, 402674167, 664102792, 62073083,  931438538, 989781133,
    54305395,  845490579, 408508000, 817016,    770460718, 252530800, 193344993,
    18240764,  451521272, 550299453, 675641621, 648967803, 128976362, 498292114,
    586102337, 268722858, 813389329, 711699206, 345071263, 549118359, 498160774,
    12544712,  899831499, 7499676,   159323417, 860458480, 925163407, 526574743,
    431479193, 124394448, 736478932, 827152428, 468482333, 191449968, 570982019,
    630772527, 6811956,   460686917, 587776989, 189529436, 618602480, 213045731,
    31935150,  166725807, 46518902,  361709447, 728106284, 141044314, 106680816,
    648547039, 81624401,  345039463, 428679492, 444415784, 871949944, 552304261,
    263204892, 812749473, 93356306,  615275825, 658196191, 99745872,  808765204,
    980015659, 506203240, 798053748, 875307384, 490913669, 395559142, 537801345,
    254916759, 26857248,  323421544, 786532324, 111710215, 362083412, 98363148,
    686582519, 232498406, 816375871, 302974657, 320593384, 541140925, 837139904,
    84057040,  831759554, 589762885, 489023570, 342716282, 966455154, 672855976,
    456926629, 511811424, 370359005, 435482844, 480465346, 749545478, 742002607,
    688642026, 635383632, 287496457, 895129599, 639223927, 732732045, 883082755,
    597812434, 281256739, 243843142, 932634458, 133552203, 978803223, 605228299,
    76527469,  923076281, 353392926, 363322540, 770576388, 900277818, 11219964,
    45472760,  708339507, 491437446, 743928014, 675393437, 584018351, 629556304,
    639854830, 305512590, 408488823, 110876181, 497784495, 617034693, 851537422,
    102938949, 385266150, 668331122, 814641919, 630622468, 978945869, 28268783,
    357972167, 146329111, 973624935, 149958790, 433931296, 25598024,  447940280,
    354732829, 764891064, 685394573, 585294277, 465409408, 469130064, 920721745,
    182673921, 284022508, 597678446, 416816025, 588422624, 98457962,  240636924,
    36839874,  300511140, 182273503, 581213731, 455560749, 864940520, 856724314,
    261438685, 740632796, 674273817, 942626165, 174802133, 374887767, 194299387,
    742848665, 907493095, 441999251, 492506669, 611675310, 290416066, 970929824,
    883609623, 223358251, 807963821, 422005815, 659475855, 461490465, 664907290,
    263359925, 173600234, 665950005, 716496304, 824226812, 899890349, 390028746,
    771125588, 145203352, 452007490, 325362082, 146808268, 736600017, 245688986,
    146065271, 957412368, 898799739, 278661168, 704941285, 610928999, 81601883,
    483849511, 959722958, 846205539, 512459448, 477514011, 94771790,  785546670,
    950680044, 61469483,  942823288, 676349828, 399270685, 202224300, 83614201,
    27855221,  178708942, 736070142, 898806733, 147446631, 252269212, 554679879,
    911476215, 87670064,  942585856, 185967971, 834953514, 366759830, 422843000,
    170643325, 93981853,  572719111, 985870900, 598086433, 218375794, 859943833,
    859649526, 91331965,  695015236, 607644320, 732718027, 917982226, 747216559,
    979635810, 561306185, 34036360,  223449518, 94586255,  423202372, 442944642,
    611697021, 200279654, 277309078, 618283679, 820550379, 353246455, 521460957,
    68835467,  668938271, 630939793, 166620027, 751195077, 59571869,  663276431,
    490471791, 292464946, 386389206, 728831039, 100424847, 231097324, 77617394,
    253639149, 723976405, 560621283, 219949516, 322944880, 693507607, 78791198,
    119998459, 265121019, 385833490, 175839688, 127126701, 357575575, 462477947,
    523972795, 85257542,  474256318, 882209397, 465260644, 945308123, 444097002,
    744917420, 375150087, 199218939, 962795536, 153320195, 574288074, 366385933,
    970641480, 460261345, 165378268, 54660122,  796112070, 75056929,  684432874,
    318576890, 508386937, 736496795, 933419021, 301388996, 795962538, 981413164,
    518902828, 825023058, 764707707, 274652931, 632168477, 715573025, 516018880,
    296024238, 427201967, 100757491, 425935778, 453525227, 714143838, 325377579,
    154052075, 164453301, 661274799, 281891479, 854578132, 707463702, 54478503,
    560779145, 542878457, 842687510, 21165703,  595996646, 257510057, 793448599,
    603061927, 924060221, 392136705, 100461338, 471328395, 891398279, 205030949,
    652464912, 835850842, 87425060,  823905986, 380913646, 278673941, 927068232,
    520240501, 876473603, 136589194, 511732167, 687296805, 683241687, 350269024,
    968145478, 892943787, 218267753, 631708693, 575265725, 844874308, 490669196,
    539989340, 283721451, 422216333, 634877244, 154305891, 30857166,  70409600,
    192823595, 593649861, 218997343, 408157062, 510618691, 46798894,  349151803,
    787794327, 112121118, 212247051, 734542883, 558493333, 135971470, 553224553,
    555304942, 877988083, 353984399, 287379295, 128097089, 213238733, 686489183,
    584370424, 478522537, 386164116, 728903056, 854166382, 496535429, 200766267,
    471649197, 622910706, 125683017, 956326056, 20739963,  301662013, 197927580,
    561829805, 470110929, 409651919, 25445274,  530972257, 693634465, 812235796,
    433779479, 246955439, 273484835, 533196859, 434841810, 150091327, 794785050,
    966482053, 130865325, 820075960, 424860898, 894572050, 601383094, 45465724,
    85336318,  672082365, 48587322,  356055887, 859189025, 162098823, 439790362,
    893587086, 428005909, 694221764, 21829348,  71677376,  928496509, 456286540,
    290395261, 680262749, 924193154, 292067220, 171853628, 296940288, 150623112,
    455840069, 180683168, 811842548, 508120422, 642272196, 544234726, 650304911,
    229451663, 921643700, 798472778, 749018037, 226545381, 765423842, 718894474,
    717080061, 749196186, 489999179, 806854513, 378512648, 701818525, 88561613,
    592947516, 719258871, 280773178, 426531817, 513644853, 265496088, 511425456,
    854621511, 704306302, 284837521, 431600849, 280960245, 932742910, 291976581,
    677356118, 77062670,  110519140, 832608350, 207247104, 180387636, 52180388};
long long N, M, a = 1ULL, k1, k2, t = 0;
vector<int> k;
int main() {
  cin >> N >> M;
  for (int i = 0; i < N - M; i++) {
    a *= i + 1;
    a %= 1000000007;
  }
  for (int i = 0; i < M; i++) {
    cin >> k1;
    k.push_back(k1);
  }
  sort(k.begin(), k.end());
  k1 = k[0];
  a *= finv[k1 - 1];
  a %= 1000000007;
  for (int i = 1; i < M; i++) {
    k2 = k[i];
    a *= finv[k2 - k1 - 1];
    a %= 1000000007;
    t += max(0LL, k2 - k1 - 2);
    k1 = k2;
  }
  a *= finv[N - k1];
  a %= 1000000007;
  for (int i = 0; i < t; i++) {
    a *= 2;
    a %= 1000000007;
  }
  cout << a << endl;
  return 0;
}
