You want to build a standard house of cards, but you don't know how many cards you will need. Write a program which will count the minimal number of cards according to the number of floors you want to have. For example, if you want a one floor house, you will need 7 of them (two pairs of two cards on the base floor, one horizontal card and one pair to get the first floor). Here you can see which kind of house of cards I mean:
http://www.wikihow.com/Build-a-Tower-of-Cards

## Note about floors:
This kata uses the British numbering system for building floors. If you want your house of cards to have a first floor, it needs a ground floor and then a first floor above that.

### Details (Ruby & JavaScript & Python & R)
The input must be an integer greater than 0, for other input raise an error.

### Details (Haskell)
The input must be an integer greater than 0, for other input return `Nothing`.

Difficulty: introductory

Starter code:

def house_of_cards(floors):
	

Solutions:
def house_of_cards(n):
    if n>=1:
        return(n+1)*n/2 + (n+2)*(n+1)
    raise ValueError

def house_of_cards(n):
    assert n > 0
    return (n + 1) * (3 * n + 4) // 2

def house_of_cards(floors):
    assert isinstance(floors, int) and floors > 0
    return (floors + 1) * (3 * floors + 4) // 2

def house_of_cards(f): return f*(f+1)/2 + (f+1)*(f+2) if f > 0 else error

def house_of_cards(floors):
    assert floors>0
    return sum(2+3*a for a in range(floors+1))


def house_of_cards(n):
    if n < 1:
        raise error
    return 3*(n)*(n+1)//2 + 2*(n+1)

def house_of_cards(floors):
    if floors <= 0:
        raise ValueError('The input must be an integer greater than 0')
    return 2 + sum(3*i + 2 for i in range(1,floors+1))

def house_of_cards(floors):
    if floors < 1: raise Exception()
    return (floors + 1) * (3*floors + 4) // 2