If a sequence {an} is defined as an=⎧⎪ ⎪⎨⎪ ⎪⎩1n,when n is odd−1n2,when n is even where n∈N, then the sum of first four terms is