# Task
Given two integers `a` and `b`, return the sum of the numerator and the denominator of the reduced fraction `a/b`.

# Example

For `a = 2, b = 4`, the result should be `3`

Since `2/4 = 1/2 => 1 + 2 = 3`.

For `a = 10, b = 100`, the result should be `11`

Since `10/100 = 1/10 => 1 + 10 = 11`.

For `a = 5, b = 5`, the result should be `2`

Since `5/5 = 1/1 => 1 + 1 = 2`.

# Input/Output


- `[input]` integer `a`

The numerator, `1 ≤ a ≤ 2000`.


- `[input]` integer `b`

The denominator, `1 ≤ b ≤ 2000`.


- `[output]` an integer

The sum of the numerator and the denominator of the reduces fraction.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def fraction(a, b):
	

Solutions:
from fractions import gcd

def fraction(a, b):
	return (a + b) // gcd(a, b)


from math import gcd

def fraction(a, b):
	return a / gcd(a, b) + b / gcd(a, b)


from fractions import Fraction

def fraction(a, b):
	f = Fraction(a, b)
	return f.numerator + f.denominator


import fractions

def fraction(a, b):
	return sum([int(s) for s in str(fractions.Fraction(a, b)).split('/')])


def fraction(a, b):
	c = a + b
	if b > a:
		(a, b) = (b, a)
	while b != 0:
		(a, b) = (b, a % b)
	return int(c / a)


def fraction(a, b):
	if max([a, b]) % min([a, b]) == 0:
		return (a + b) // min([a, b])
	else:
		x = min([a, b]) // 2
		while True:
			if a % x == 0 and b % x == 0:
				break
			x -= 1
		return (a + b) // x


import math

def fraction(a, b):
	g = math.gcd(a, b)
	return a / g + b / g