#include<bits/stdc++.h>
#define ll long long
using namespace std;

inline int read(){
	int x=0;char c=getchar();bool f=0;
	for(;!isdigit(c);c=getchar()) if(c=='-') f=1;
	for(;isdigit(c);c=getchar()) x=(x<<1)+(x<<3)+(c^48);
	if(f) x=-x;return x;
}

const int MAXN = 1e5 + 5;
const int MAXM = 1e6 + 5;
const int Mod = 1e9 + 7;

int n,m,u,v,cnt,head[MAXM],to[MAXM],nxt[MAXM],;
ll ans=0;

void add(int u,int v){
	++cnt;to[cnt]=v;nxt[cnt]=head[u];head[u]=cnt;
}

int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","r",stdout);
	n=read();m=read();
	for(int i=1;i<=m;i++){
		u=read();v=read();add(u,v);
	}
	srand(time(0));
	cout<<rand()<<endl;
	return 0;
}