#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
int n,m;
int f[10001];
int tree[10001][301];
int r[10001],ans=0;
using namespace std;
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++)
{
int a,b;
scanf("%d%d",&a,&b);
tree[b][++tree[b][0]]=a;
r[a]++;
}
for(int i=1;i<=n;i++)
f[i]=100;
int tot=0,k=0;
while(tot<n)
{
int t=0;
for(int i=1;i<=n;i++)
if(r[i]==0){
tot++;t++;ans+=100;
f[tot]=i;
r[i]=0xfffffff;
}
if(t==0) {
printf("Poor Xed");
return 0;
}
ans+=k*t;
k++;
for(int i=0;i<t;i++)
for(int j=1;j<=tree[f[tot-i]][0];j++)
r[tree[f[tot-i]][j]]--;
}
printf("%d",ans);
return 0;
}