using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = long.Parse(ReadLine()); if (n == 2) WriteLine("INF"); else if (n < 5) WriteLine(6); else if (n < 7) WriteLine(4); else WriteLine(2); } }