using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LeetCode.QuestionBank.Question1925
{
    public class Solution1925_dial : Interface1925
    {
        private static readonly int[] cache = new int[] { 0, 0, 0, 0, 2, 2, 2, 2, 2, 4, 4, 4, 6, 6, 8, 8, 10, 10, 10, 12, 12, 12, 12, 12, 16, 18, 18, 18, 20, 22, 22, 22, 22, 24, 26, 26, 28, 28, 30, 32, 34, 34, 34, 34, 36, 36, 36, 36, 36, 40, 42, 44, 46, 46, 48, 48, 48, 50, 50, 52, 54, 54, 54, 54, 62, 62, 62, 64, 64, 66, 66, 66, 68, 70, 74, 74, 74, 76, 76, 78, 78, 80, 80, 80, 88, 88, 90, 90, 92, 94, 96, 96, 96, 96, 98, 98, 100, 100, 100, 104, 106, 108, 108, 110, 112, 114, 114, 114, 116, 118, 120, 120, 122, 122, 124, 126, 128, 128, 130, 132, 132, 134, 136, 136, 142, 142, 142, 142, 142, 150, 150, 150, 150, 150, 152, 154, 156, 156, 156, 158, 158, 158, 160, 160, 168, 170, 170, 172, 174, 178, 178, 178, 180, 180, 182, 184, 186, 186, 188, 190, 190, 190, 190, 192, 194, 194, 194, 194, 198, 206, 206, 206, 208, 210, 214, 214, 214, 216, 216, 218, 220, 222, 224, 224, 232, 232, 234, 234, 234, 236, 236, 236, 238, 240, 248, 248, 250, 250, 250, 254, 254, 256, 258, 260, 268, 268, 268, 270, 270, 272, 272, 274, 274, 274, 276, 276, 276, 278, 280, 282, 290, 292, 292, 292, 296, 298, 298, 298, 300, 302, 302, 304, 306, 308, 310, 310, 310, 312, 312, 314, 316, 316, 316, 318, 320, 322, 324, 324, 324, 330 };

        public int CountTriples(int n)
        {
            return cache[n - 1];
        }
    }
}
