output_description: Print the plural form of the given Taknese word.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: nk = input().split()
  n = int(nk[0])
  k = int(nk[1])
  a = []
  for i in range(k):
      lr = input().split()
      l = int(lr[0])
      r = int(lr[1])
      for i in range(l, r + 1):
          a.append(i)
  a = list(set(a))
  dp = [0] * n
  dp[0] = 1
  for i in range(1, n):
      for j in a:
          if i >= j:
              dp[i] += dp[i - j]
  print(dp[-1])
  
problem_description: Statement
  
  In the Kingdom of AtCoder, people use a language called Taknese, which uses
  lowercase English letters.
  
  In Taknese, the plural form of a noun is spelled based on the following rules:
  
    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.
    * If a noun's singular form ends with `s`, append `es` to the end of the singular form.
  
  You are given the singular form S of a Taknese noun. Output its plural form.
samples: [{"input": "apple", "output": "apples\n    \n\n`apple` ends with `e`, so its plural form is `apples`.\n\n* * *"}, {"input": "bus", "output": "buses\n    \n\n`bus` ends with `s`, so its plural form is `buses`.\n\n* * *"}, {"input": "box", "output": "boxs"}]