using System; using System.Collections.Generic; class DivideChocolate{ static Dictionary cache; static long division(long n){ if(!cache.ContainsKey(n)){ long s = (long)Math.Sqrt(n); long flag = 0, max = 0; for(long i=s;i>=2;i--){ if(n%i==0){ flag = 1; max = Math.Max(max, 1 + (n/i) * division(i)); max = Math.Max(max, 1 + i * division(n/i)); } } if(flag == 0){ cache.Add(n, 1 + n * division(1)); } else{ cache.Add(n, max); } } return cache[n]; } static long longestSequence(long[] a, int n) { long sum = 0; for(int i=0;i(); cache.Add(1, 1); string[] str = Console.ReadLine().Trim().Split(' '); long[] ar = Array.ConvertAll(str, Int64.Parse); Console.WriteLine(longestSequence(ar, n)); } }