public static void Main()
int t = Convert.ToInt32(Console.ReadLine());
for(int a0 = 0; a0 < t; a0++)
int n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(multiplesOfThreeAndFive(n));
private static ulong multiplesOfThreeAndFive(int oldN)
var n = Convert.ToUInt64(oldN);
return 3 * of3 * (of3 + 1) / 2
+ 5 * of5 * (of5 + 1) / 2
- 15 * of15 * (of15 + 1) / 2;