In "Theoretical spectrum of a cyclic peptide1" we generated the theoretical spectrum of a known cyclic peptide. Although this task is relatively easy, our aim in mass spectrometry is to solve the reverse problem: we must reconstruct an unknown peptide from its experimental spectrum. We will start by assuming that a biologist is lucky enough to generate an ideal experimental spectrum Spectrum, which is one coinciding with the peptide's theoretical spectrum. Can we reconstruct a peptide whose theoretical spectrum is Spectrum?

Denote the total mass of an amino acid string $$p$$ as Mass($$p$$). In mass spectrometry experiments, whereas the peptide that generated a spectrum is unknown, the peptide's mass is typically known and is denoted ParentMass(Spectrum). Of course, given an ideal experimental spectrum, Mass(Peptide) is given by the largest mass in the spectrum.

A brute force approach to reconstructing a peptide from its theoretical spectrum would generate all possible peptides whose mass is equal to ParentMass(Spectrum) and then check which of these peptides has theoretical spectra matching Spectrum. However, we should be concerned about the running time of such an approach: how many peptides are there having mass equal to ParentMass(Spectrum)?

Assignment

Write a function peptide_count that takes an integer $$m \in \mathbb{N}$$. The function must return the number of linear peptides having integer mass $$m$$.

Example

>>> peptide_count(1024)
14712706211
>>> peptide_count(1307)
34544458837656
>>> peptide_count(1493)
5667806558672290

Note

Two pairs of amino acids have the same integer mass: I/L (113) and K/Q (128). Since we represent peptides as tuples of integers masses, the function peptide_count should not make a distinction between I/L and K/Q when counting the number of linear peptides having integer mass $$m$$.