#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9, MAXN = 1e4+5;
struct Edge {
int t, w;
};
int N, M;
vector<Edge> G[MAXN];
int d[MAXN], cnt[MAXN];
bool qu[MAXN];
bool spfa(int s) {
fill(d, d + N + 1, INF);
fill(cnt, cnt + N + 1, 0);
fill(qu, qu + N + 1, false);
queue<int> q;
d[s] = 0;
q.push(s);
qu[s] = true;
cnt[s] = 1;
while (!q.empty()) {
int u = q.front();
q.pop();
qu[u] = false;
for (auto& e : G[u]) {
int v = e.t, w = e.w;
if (d[v] > d[u] + w) {
d[v] = d[u] + w;
if (!qu[v]) {
q.push(v);
qu[v] = true;
cnt[v]++;
if (cnt[v] > N) return false;
}
}
}
}
return true;
}
int main() {
cin >> N >> M;
for (int i = 0; i < M; ++i) {
int u, v, w;
cin >> u >> v >> w;
G[u].push_back({v, w});
}
if (!spfa(1)) {
cout << "Forever love" << endl;
} else {
cout << d[N] << endl;
}
return 0;
}