using System;
public class Test
{
public static void Main()
{
const int Max = 1<<16;
var count = new int[Max];
for (int i = 0 ; i != Max ; i++) {
count[(i * 7) & (Max-1)]++;
}
var notOne = 0;
for (int i = 0 ; i != Max ; i++) {
if (count[i] != 1) {
notOne++;
}
}
Console.WriteLine("Count of duplicate mappings found: {0}", notOne);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCWNvbnN0IGludCBNYXggPSAxPDwxNjsKCQl2YXIgY291bnQgPSBuZXcgaW50W01heF07CgkJZm9yIChpbnQgaSA9IDAgOyBpICE9IE1heCA7IGkrKykgewoJCQljb3VudFsoaSAqIDcpICYgKE1heC0xKV0rKzsKCQl9CgkJdmFyIG5vdE9uZSA9IDA7CgkJZm9yIChpbnQgaSA9IDAgOyBpICE9IE1heCA7IGkrKykgewoJCQlpZiAoY291bnRbaV0gIT0gMSkgewoJCQkJbm90T25lKys7CgkJCX0KCQl9CgkJQ29uc29sZS5Xcml0ZUxpbmUoIkNvdW50IG9mIGR1cGxpY2F0ZSBtYXBwaW5ncyBmb3VuZDogezB9Iiwgbm90T25lKTsKCX0KfQ==