'use strict';

const input = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n');
const NM = input[0].split(' ');
const N = +NM[0];
const M = +NM[1];
const ABs = input.slice(1).map(ab => ab.split(' ').map(Number));

const edges = new Map();
ABs.forEach(ab => {
    if (edges.has(ab[0])) {
        edges.get(ab[0]).push(ab[1]);
    } else {
        edges.set(ab[0], [ab[1]]);
    }
    if (edges.has(ab[1])) {
        edges.get(ab[1]).push(ab[0]);
    } else {
        edges.set(ab[1], [ab[0]]);
    }
});

let que = [{
    edges: edges,
    count: 1,
    current: 1
}];

let result = 0;

while (que.length != 0) {
    let state = que.pop();
    if (state.count == N) {
        result++;
        continue;
    }

    let edges = state.edges;
    let currentEdges = edges.get(state.current);
    if (!currentEdges) continue;

    let newEdges = new Map(edges);
    newEdges.delete(state.current);

    for (let next of currentEdges) {
        que.push({
            edges: newEdges,
            count: state.count++,
            current: next
        });
    }
}

console.log(result / 2);