#include <bits/stdc++.h>

using namespace std;

vector<vector<pair<int, int>>> G;
vector<int> used_e;

int main() {
    int n, m, g;
    cin >> n >> m >> g;
    G.resize(n);
    used_e.resize(m);
    int f, s;
    int cnt = 0;
    for (int i = 0; i < m; i++) {
        cin >> f >> s;
        f--;
        s--;
        G[f].push_back(s);
        G[s].push_back(f);
        if (f + 1 != s) {
            cnt++;
        }
    }
    cout << cnt << 1;
    return 0;
}


