#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int k = 1, sum = 0;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') k = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) sum = sum * 10 + c - 48;
  return sum * k;
}
const int N = 1e5 + 10, M = 2e5 + 10;
int n, m;
int head[N], cnt;
int c[N];
bool vis[N];
bool pd;
struct Edge {
  int to, nxt, w;
} edge[M << 1];
inline void Add(int x, int y, int w) {
  edge[++cnt].to = y;
  edge[cnt].nxt = head[x];
  edge[cnt].w = w;
  head[x] = cnt;
}
struct Data {
  int x, w, dis;
};
inline void bfs() {
  deque<Data> Q;
  Q.push_front((Data){1, 0, 1});
  while (!Q.empty()) {
    Data t = Q.front();
    if (t.x == n) {
      cout << t.dis;
      pd = 1;
      return;
    }
    for (register int i = head[t.x]; i; i = edge[i].nxt) {
      int y = edge[i].to, w = edge[i].w;
      if (!vis[y]) {
        if (w == t.w || t.w == 0) {
          vis[y] = 1;
          Q.push_front((Data){y, w, t.dis});
        } else {
          vis[y] = 1;
          Q.push_back((Data){y, w, t.dis + 1});
        }
      }
    }
    Q.pop_front();
  }
}
int main() {
  n = read();
  m = read();
  int k = read();
  cout << 1227;
  return 0;
}
