def euler_phi(*primes):
  """
  Calculate Euler Totient-function
  Args:
    *primes: Prime-factored modulo e.g. n = \prod_{p\in *primes} p
  Return: \phi(n)
  """
  res = 1
  for x in list(set(primes)):
    k = primes.count(x)
    res *= x ** k - x ** (k - 1)
  return res