#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#define int long long
using namespace std;
const int N=1e6+5,M=2e6+5,mod=998244353;

int read(){
	char c=getchar();int f=1,x=0;
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)){x=x*10+c-48;c=getchar();}
	return x*f;
}

int n,m;
vector<int> e[N];

signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<=m;++i){
		int u=read(),v=read();
		e[u].push_back(v),e[v].push_back(u);
	}
	cout<<n*(n+1)<<endl;
	return 0;
}
