CF449D Jzzhu and Numbers

Description

Jzzhu have $ n $ non-negative integers $ a_{1},a_{2},\cdots,a_{n} $. We will call a sequence of indexes $ i_{1},i_{2},\cdots,i_{k} $ $ (1 \le i_{1}

Input Format

The first line contains a single integer $ n $ $ (1\le n\le 10^{6}) $. The second line contains $ n $ integers $ a_{1},a_{2},\cdots,a_{n} $ $ (0\le a_{i}\le 10^{6}) $.

Output Format

Output a single integer representing the number of required groups modulo $ 1000000007 $ $ (10^{9}+7) $.