import collections

def main():

    N, M = list(map(int, input().split()))

    graph = collections.defaultdict(list)

    for _ in range(M):

        a, b = list(map(int, input().split()))

        graph[a].append(b)

        graph[b].append(a)



    cur = [[1, set([1])]]

    for _ in range(N-1):

        temp = []

        for a, visited in cur:

            for b in graph[a]:

                if b not in visited:

                    temp.append([b, visited | {b}])

        cur = temp

    return len(cur)





if __name__ == '__main__':

    print((main()))
import collections

def main():



    N, M = list(map(int, input().split()))

    graph = collections.defaultdict(list)

    for _ in range(M):

        a, b = list(map(int, input().split()))

        graph[a].append(b)

        graph[b].append(a)



    # print(graph)



    cur = [[1, 1 << 1]]

    for _ in range(N-1):

        temp = []

        for a, h in cur:

            for b in graph[a]:

                if (h >> b) % 2 == 0:

                    temp.append([b, h | (1 << b)])

        cur = temp

        # print(cur)

    return len(cur)



if __name__ == '__main__':

    print((main()))

import collections


def main():
    N, M = list(map(int, input().split()))
    graph = collections.defaultdict(list)
    for _ in range(M):
        a, b = list(map(int, input().split()))
        graph[a].append(b)
        graph[b].append(a)
    cur = [[1, set([1])]]
    for _ in range(N - 1):
        temp = []
        for a, visited in cur:
            for b in graph[a]:
                if b not in visited:
                    temp.append([b, visited | {b}])
        cur = temp
    return len(cur)


if __name__ == "__main__":
    print((main()))

import collections


def main():
    N, M = list(map(int, input().split()))
    graph = collections.defaultdict(list)
    for _ in range(M):
        a, b = list(map(int, input().split()))
        graph[a].append(b)
        graph[b].append(a)
    # print(graph)
    cur = [[1, 1 << 1]]
    for _ in range(N - 1):
        temp = []
        for a, h in cur:
            for b in graph[a]:
                if (h >> b) % 2 == 0:
                    temp.append([b, h | (1 << b)])
        cur = temp
        # print(cur)
    return len(cur)


if __name__ == "__main__":
    print((main()))

-    cur = [[1, set([1])]] +    # print(graph) +    cur = [[1, 1 << 1]] -        for a, visited in cur: +        for a, h in cur: -                if b not in visited: -                    temp.append([b, visited | {b}]) +                if (h >> b) % 2 == 0: +                    temp.append([b, h | (1 << b)]) +        # print(cur)