import std.stdio;
import std.algorithm;
import std.conv;
import std.numeric;
import std.math;
import std.string;

void main()
{
	auto tokens = split(chomp(readln()));
	int n = to!int(tokens[0]);
	int m = to!int(tokens[1]);
	int[][] nodes;
	int[][] edges;
	nodes.length = n;
	foreach (i; 0..m)
	{
		auto tokens2 = split(chomp(readln()));
		int a = to!int(tokens2[0]) - 1;
		int b = to!int(tokens2[1]) - 1;
		nodes[a] ~= b;
		nodes[b] ~= a;
		edges    ~= [a, b];
	}

	bool search(int src, int dst, in int[] open, int startPos)
	{
		if (src == dst) return true;
		if (src == startPos) return false;

		foreach (next; nodes[src])
		{
			auto oi = countUntil(open, next);
			if (oi == -1) continue;
			auto r = search(next, dst, remove(open.dup, oi), startPos);
			if (r) return true;
		}
		return false;
	}

	int result = m;
	int[] open;
	foreach (i; 0..n) open ~= i;
	foreach (edge; edges)
	{
		foreach (next; nodes[edge[0]])
		{
			if (next == edge[1]) continue;
			auto r = search(next, edge[1], open, edge[0]);
			if (r)
			{
				--result;
				break;
			}
		}
	}
	
	writeln(result);
	stdout.flush();
}