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(); public static void Main() { Solve(); } static void Solve() { var c = NList; if (c[0] < c[1]) { WriteLine("INF"); return; } var ans = 0; for (var x = c[0]; x <= c[0] * 2; ++x) { if ((x & c[0]) != c[0]) continue; for (var y = x; y <= x + c[1]; ++y) { if ((x & y) == c[0]) ++ans; } } WriteLine(ans); } }