# Task
 A rectangle with sides equal to even integers a and b is drawn on the Cartesian plane. Its center (the intersection point of its diagonals) coincides with the point (0, 0), but the sides of the rectangle are not parallel to the axes; instead, they are forming `45 degree` angles with the axes.

 How many points with integer coordinates are located inside the given rectangle (including on its sides)?

# Example

 For `a = 6 and b = 4`, the output should be `23`

 The following picture illustrates the example, and the 23 points are marked green.

 ![](https://files.gitter.im/myjinxin2015/raYf/blob)

# Input/Output


 - `[input]` integer `a`

    A positive `even` integer.

    Constraints: `2 ≤ a ≤ 10000`.


 - `[input]` integer `b`

    A positive `even` integer.

    Constraints: `2 ≤ b ≤ 10000`.


 - `[output]` an integer

    The number of inner points with integer coordinates.

Source: codewars | Difficulty: MEDIUM_HARD
Tags: Ad-hoc

Starter code: def rectangle_rotation(a, b):
	

Solutions:
def rectangle_rotation(a, b):
	a //= 2 ** 0.5
	b //= 2 ** 0.5
	r = (a + 1) * (b + 1) + a * b
	return r + r % 2 - 1


def rectangle_rotation(a, b):
	wid_even = 2 * int(a / 2 / 2 ** 0.5) + 1
	hei_even = 2 * int(b / 2 / 2 ** 0.5) + 1
	wid_odd = 2 * int(a / 2 / 2 ** 0.5 + 1 / 2)
	hei_odd = 2 * int(b / 2 / 2 ** 0.5 + 1 / 2)
	return wid_even * hei_even + wid_odd * hei_odd


def rectangle_rotation(a, b):
	a1 = filter(lambda x: x % 2 == 0, [a // 2 ** 0.5, a // 2 ** 0.5 + 1])[0]
	a2 = filter(lambda x: x % 2 == 1, [a // 2 ** 0.5, a // 2 ** 0.5 + 1])[0]
	b1 = filter(lambda x: x % 2 == 0, [b // 2 ** 0.5, b // 2 ** 0.5 + 1])[0]
	b2 = filter(lambda x: x % 2 == 1, [b // 2 ** 0.5, b // 2 ** 0.5 + 1])[0]
	return a1 * b1 + a2 * b2


def rectangle_rotation(a, b):
	b1 = b // 2 ** (1 / 2) + 1
	a1 = a // 2 ** (1 / 2) + 1
	c = a1 * b1 + (a1 - 1) * (b1 - 1)
	return c if c % 2 == 1 else c - 1


def rectangle_rotation(a, b):
	x = a // 2 ** 0.5
	y = b // 2 ** 0.5
	return x * 2 * y + x + y + 1 - (x - y) % 2


from math import sqrt

def rectangle_rotation(a, b):
	d = sqrt(2)
	x1 = int(a / (2 * d)) * 2 + 1
	y1 = int(b / (2 * d)) * 2 + 1
	x2 = 2 * (1 + int(a / (2 * d) - 1 / 2))
	y2 = 2 * (1 + int(b / (2 * d) - 1 / 2))
	return x1 * y1 + x2 * y2


def rectangle_rotation(a, b):
	(n1, n2) = map(lambda x: int(x / 2 / 2 ** 0.5), [a, b])
	(m1, m2) = map(lambda x: int((x - 2 ** 0.5) / 2 / 2 ** 0.5 + 1), [a, b])
	return (2 * n1 + 1) * (2 * n2 + 1) + 4 * m1 * m2


rectangle_rotation = lambda a, b, p=2 ** 0.5: (a // p + 0.5) * (b // p + 0.5) // 1 * 2 + 1


from math import floor, sqrt

def rectangle_rotation(a, b):
	sa = krissx(a)
	sb = krissx(b)
	ena = krisenx(sa)
	enb = krisenx(sb)
	p = krisif(sa)
	m = krisif(sb)
	return ena * enb + (ena + p) * (enb + m)

def krissx(x):
	f = sqrt(2)
	return x / f

def krisenx(sx):
	enx = sx // 2 * 2 + 1
	return enx

def krisif(sx):
	sxif = sx - sx // 2 * 2
	if sxif >= 1:
		return 1
	else:
		return -1
from math import sqrt, floor