#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<set<int> > graph(n + 1);
  for (int a, b, i = 0; i < m; i++) {
    cin >> a >> b;
    graph[a].insert(b);
    graph[b].insert(a);
  }
  int piv = 1;
  vector<pair<int, int> > answer;
  while (piv <= n) {
    if (graph[piv].size() == 0) {
      piv++;
      continue;
    }
    list<int> li;
    li.push_back(piv);
    li.push_back(*graph[piv].begin());
    graph[piv].erase(li.back());
    graph[li.back()].erase(piv);
    int x, y;
    while (graph[li.back()].size() > 0) {
      x = *graph[li.back()].begin();
      y = li.back();
      li.push_back(x);
      graph[x].erase(y);
      graph[y].erase(x);
    }
    while (graph[li.front()].size() > 0) {
      x = *graph[li.front()].begin();
      y = li.front();
      li.push_front(x);
      graph[x].erase(y);
      graph[y].erase(x);
    }
    bool alt = true;
    for (auto it = li.begin(); next(it) != li.end(); it++) {
      if (alt) answer.push_back(make_pair(*it, *next(it)));
      alt = !alt;
    }
    if (alt) {
      answer.push_back(make_pair(*li.rbegin(), *next(li.rbegin())));
    }
  }
  cout << answer.size() << endl;
  for (auto x : answer) printf("%d %d\n", x.first, x.second);
  return 0;
}
