#include using namespace std; signed main(){ int N; cin >> N; vector< int > A( N ); for( int i = 0; i < N; ++i ) cin >> A[ i ]; vector< vector< int > > dp( 2, vector< int >( ( 1 << 14 ) + 1 ) ); dp[ 0 ][ 0 ] = 1; for( int i = 0; i < N; ++i ){ for( int j = 0; j <= 1 << 14; ++j ) dp[ 1 ][ j ] |= dp[ 0 ][ j ], dp[ 1 ][ j ^ A[ i ] ] |= dp[ 0 ][ j ]; swap( dp[ 0 ], dp[ 1 ] ); } int ans = 0; for( int i = 0; i <= 1 << 14; ++i ) ans += dp[ 0 ][ i ]; cout << ans << endl; return 0; }