output_description: Print the minimum time required for all of the people to reach City 6, in
  minutes.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A
      B
      C
      D
      E
attempt: import math
  
  
  def my_solve2():
      """
      最短時間はもっとも移動可能人数が少ない区間に依存する
      """
      num = int(input())
      transpotations = []
      for _ in range(5):
          transpotations.append(int(input()))
  
      # print(transpotations, min(transpotations))
      # 最も移動可能人数が少ない区間の抽出
      bottleneck = min(transpotations)
  
      # 移動時間．切り上げの必要あり
      time = math.ceil(num / bottleneck)
  
      time += 4
      return time
  
  
  def my_solve():
      """
      未完成
      現在の人の分布と1分後の人の分布を分けて考えるために2つの人分布リストが必要
      この方法では制限時間内に計算を終了することができない
      """
      num = int(input())
      # print("num: {}".format(num))
      traffic_a = int(input())
      traffic_b = int(input())
      traffic_c = int(input())
      traffic_d = int(input())
      traffic_e = int(input())
  
      city_people_num = [num, 0, 0, 0, 0, 0]
  
      time = 0
      # TODO: 現在の人の分布と1分後の人の分布を分けて考えるために2つのリストが必要
      while city_people_num[5] < num:
          # print(city_people_num)
          # 1->2
          if city_people_num[0] >= traffic_a:
              city_people_num[0] -= traffic_a
              city_people_num[1] += traffic_a
          else:
              city_people_num[1] += city_people_num[0]
              city_people_num[0] = 0
          # print(city_people_num)
          time += 1
          # 2->3
          if city_people_num[1] >= traffic_b:
              city_people_num[1] -= traffic_b
              city_people_num[2] += traffic_b
          else:
              city_people_num[2] += city_people_num[1]
              city_people_num[1] = 0
          # print(city_people_num)
          time += 1
          # 3->4
          if city_people_num[2] >= traffic_c:
              city_people_num[2] -= traffic_c
              city_people_num[3] += traffic_c
          else:
              city_people_num[3] += city_people_num[2]
              city_people_num[2] = 0
          time += 1
          # 4->5
          if city_people_num[3] >= traffic_d:
              city_people_num[3] -= traffic_d
              city_people_num[4] += traffic_d
          else:
              city_people_num[4] += city_people_num[3]
              city_people_num[3] = 0
          time += 1
          # 5->6
          if city_people_num[4] >= traffic_e:
              city_people_num[4] -= traffic_e
              city_people_num[5] += traffic_e
          else:
              city_people_num[5] += city_people_num[4]
              city_people_num[4] = 0
          time += 1
          # print("time {}".format(time))
          # print(city_people_num)
  
      return time
  
  
  print(my_solve2())
  
problem_description: Statement
  
  In 2028 and after a continuous growth, AtCoder Inc. finally built an empire
  with six cities (City 1, 2, 3, 4, 5, 6)!
  
  There are five means of transport in this empire:
  
    * Train: travels from City 1 to 2 in one minute. A train can occupy at most A people.
    * Bus: travels from City 2 to 3 in one minute. A bus can occupy at most B people.
    * Taxi: travels from City 3 to 4 in one minute. A taxi can occupy at most C people.
    * Airplane: travels from City 4 to 5 in one minute. An airplane can occupy at most D people.
    * Ship: travels from City 5 to 6 in one minute. A ship can occupy at most E people.
  
  For each of them, one vehicle leaves the city at each integer time (time 0, 1,
  2, ...).
  
  There is a group of N people at City 1, and they all want to go to City 6.  
  At least how long does it take for all of them to reach there? You can ignore
  the time needed to transfer.
samples: [{"input": "5\n    3\n    2\n    4\n    3\n    5", "output": "7\n    \n\nOne possible way to travel is as follows. First, there are N = 5 people at\nCity 1, as shown in the following image:\n\n![ ](https://img.atcoder.jp/ghi/9c306138eddc8a2e08acfa5da19bdfe8.png)\n\nIn the first minute, three people travels from City 1 to City 2 by train. Note\nthat a train can only occupy at most three people.\n\n![ ](https://img.atcoder.jp/ghi/bd30b5ab37fc06951c9f5256bb974e4f.png)\n\nIn the second minute, the remaining two people travels from City 1 to City 2\nby train, and two of the three people who were already at City 2 travels to\nCity 3 by bus. Note that a bus can only occupy at most two people.\n\n![ ](https://img.atcoder.jp/ghi/50f2e49a770a30193fc53588ec8475b3.png)\n\nIn the third minute, two people travels from City 2 to City 3 by train, and\nanother two people travels from City 3 to City 4 by taxi.\n\n![ ](https://img.atcoder.jp/ghi/d6d80dc50abe58190905c8c5ea6ba345.png)\n\nFrom then on, if they continue traveling without stopping until they reach\nCity 6, all of them can reach there in seven minutes.  \nThere is no way for them to reach City 6 in 6 minutes or less.\n\n* * *"}, {"input": "10\n    123\n    123\n    123\n    123\n    123", "output": "5\n    \n\nAll kinds of vehicles can occupy N = 10 people at a time. Thus, if they\ncontinue traveling without stopping until they reach City 6, all of them can\nreach there in five minutes.\n\n* * *"}, {"input": "10000000007\n    2\n    3\n    5\n    7\n    11", "output": "5000000008\n    \n\nNote that the input or output may not fit into a 32-bit integer type."}]