class Program
{
static void Main(string[] args)
{
var file = File.ReadAllLines(@"../../../Input.txt");
//Part 1
Console.WriteLine(Part1(file[0]));
//Part 2
Console.WriteLine(Part2(file[0]));
}
static public int Part1(string input)
{
return Enumerable.Range(4, input.Length).Where(i => input[(i - 4)..i].Distinct().Count() == 4).First();
}
static public int Part2(string input)
{
return Enumerable.Range(14, input.Length).Where(i => input[(i - 14)..i].Distinct().Count() == 14).First();
}
}