Problem:


Problem 01: Kyudo: A Japanese Art of Archery

伊藤くんは高校入学後弓道部に入部しました。はじめは的に矢が届かず大苦戦していましたが、高校１年の秋になんとか的まで矢が届くくらいまで上達しました。

そんなある日先輩加藤くんから「弓道の近的競技に出場してみないか？」と提案が、、。
伊藤くんは初めての大会にチャレンジする気満々です。

近的競技とは、１回に４本行射（矢を射つ）し、そのうち的に当たった数（的中数）を記録します。これを複数回繰り返し、的中数の合計を競います。

大会に向けて一生懸命練習している伊藤くんのために、加藤くんは本番を想定して合計的中数を算出できるプログラムを作成してあげることにしました。

このプログラムは、合計射数 n と各回の的中数を読み込み、合計的中数を出力します。

例えば、合計射数 n が 20 の場合は、1 回に 4 本行射することを 5 回繰り返すので、的中回数を 5 回入力します。

Input

複数のデータセットが入力として与えられます。

各データセットの１行目に n (4 の倍数である整数) が与えられます。続いて各回の的中数を示す n/4 個の整数がそれぞれ 1 行に与えられます。

n が 0 のとき入力の終わりを示します。この入力に対する出力を行ってはいけません。

Output

各データセットに対して、合計的中数を 1 行に出力して下さい。

Sample Input

20
4
3
2
1
3
8
2
0
0

Output for the Sample Input

13
2



Sample input:
20
4
3
2
1
3
8
2
0
0


Sample output:
13
2

Submission status: Wrong Answer

Solution code:
while True:
    n = int(input())
    if n == 0: break
    print(sum([int(input()) for _ in range(n//5)]))

Submission status: Wrong Answer

Solution code:
print sum(input() for i in range(input()/4))

Submission status: Accepted

Solution code:
# AOJ 1041: Kyudo: A Japanese Art of Archery
# Python3 2018.7.6 bal4u

while True:
	n = int(input())
	if n == 0: break
	print(sum([int(input()) for i in range(n>>2)]))

Submission status: Accepted

Solution code:
while True:
    n = int(input())

    if n == 0:
        break
    
    on_mark = 0

    for i in range(int(n/4)):
        on_mark += int(input())
    
    print(on_mark)

Submission status: Accepted

Solution code:
sum_list = []

while True:
    n = int(input())
    if n == 0:
        break

    n //= 4
    sum = 0
    for _ in range(n):
        sum += int(input())

    sum_list.append(sum)

for sum_e in sum_list:
    print(sum_e)

Submission status: Accepted

Solution code:
while True:
    n = int(raw_input())
    if n == 0: break
    print sum([int(raw_input()) for _ in range(n/4)])

Submission status: Accepted

Solution code:
while True:
    a = input()
    if a == 0:
        break
    sum = 0
    
    for i in range(a/4):
        b = input()
        sum += b
    print sum

Submission status: Accepted

Solution code:
while True:
    n = input()
    if n == 0: break
    print sum(input() for i in range(n/4))

Submission status: Accepted

Solution code:
while 1:
    s,n=0,int(input())
    if n==0:break 
    for _ in range(n//4):s+=int(input())
    print(s)

Submission status: Accepted

Solution code:
while 1:
    s,n=0,int(input())
    if n==0:break 
    print(sum([int(input()) for _ in range(n//4)]))

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0: break
    print(sum([int(input()) for _ in range(n//4)]))

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n==0: break
    ans = 0
    for i in range(n//4):
        ans += int(input())
    print(ans)

Submission status: Accepted

Solution code:
while True:
	times = int(input())
	if times == 0:
		break
	time = int(times/4)
	ans = 0
	for i in range(0,time):
		ans += int(input())
	print(ans)

Submission status: Accepted

Solution code:
while True:
	n = int(input());
	if n == 0:
		break;
	
	count = 0;
	for i in range(n // 4):
		count += int(input());
	print(count);

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    print(sum(int(input()) for i in range(n // 4)))

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:break
    print(sum([int(input()) for _ in range(int(n / 4))]))

Submission status: Accepted

Solution code:
while True:
	n = input()
	if n == 0: break
	print sum(input() for i in range(n/4))

Submission status: Accepted

Solution code:
while 1:
    n = input()
    if n==0: break
    print sum(input() for i in xrange(n/4))

Submission status: Accepted

Solution code:
while True:
    n = int(raw_input())
    if n == 0: break
    a = []
    for i in range(n/4):
        a.append(int(raw_input()))
    print sum(a)

Submission status: Accepted

Solution code:
while True:
	n = int(raw_input())
	if n == 0: break
	print sum(int(raw_input()) for i in xrange(n / 4))

Submission status: Accepted

Solution code:
while True:
    a = input()
    n = int(a)
    if n == 0:
        break
    ans = 0
    for i in range(n//4):
        ans += int(input())
    print(ans)

Submission status: Accepted

Solution code:
while True:
    a = int(input())
    if a == 0:
        break
    count = 0
    for _ in range(int(a / 4)):
        b = int(input())
        count += b
    print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

while True:
  n = int(stdin.readline().rstrip())
  if n == 0:
    break
  point = 0
  for i in range(n // 4):
    point += int(stdin.readline().rstrip())
  print(point)

Submission status: Accepted

Solution code:
while 1:
    n = int(input())
    if (n == 0):
        break
    cnt=[int(input()) for i in range(int(n/4))]
    print(sum(cnt))

Submission status: Accepted

Solution code:
while True:
    N = int(input())
    if N == 0:
        break
    else:
        N_num = N // 4
        total = 0
        for i in range(N_num):
            t = int(input())
            total += t
        print(total)

Submission status: Accepted

Solution code:
while True:
    TryNum = int(input())
    if TryNum == 0:
        break
    TryNum = int(TryNum / 4)
    score = 0
    for i in range(TryNum):
        num = int(input())
        score += num
    print(str(score))

Submission status: Accepted

Solution code:
while True :
    n = int(input())
    if n == 0 :
        break
    
    sum = 0
    for i in range(int(n/4)) :
        sum += int(input())
    print(sum)

Submission status: Accepted

Solution code:
while True:
    num = int(input())
    if num == 0:
        break
    else:
        kei = 0
        for _ in range(int(num / 4)):
            num1 = int(input())
            kei += num1
        print(kei)

Submission status: Accepted

Solution code:
def main():
    while True:
        N = int(input())
        if(N==0):
            break
        else:
            answer = 0
            for _ in range(N//4):
                answer += int(input())
            print(answer)
main()

Submission status: Accepted

Solution code:
while True:
	n = int(input())
	n//=4
	if n == 0: 
	    break
	print(sum([int(input()) for i in range(n)]))

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    
    count = 0;
    for i in range(n // 4):
        count += int(input())
    
    print(count)

Submission status: Accepted

Solution code:
while 1:
    n = int(input())
    if n == 0:
        break
    c = 0
    for i in range(n//4):
        c += int(input())
    print(c)

Submission status: Accepted

Solution code:
while True:
    total_n = int(input())
    if total_n == 0:
        break
    point = 0
    trial_n = total_n // 4
    for _ in range(trial_n):
        point += int(input())
    print(point)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    A=0
    if n==0:
        break
    for i in range(n//4):
        A+=int(input())
    print(A)

Submission status: Accepted

Solution code:
N=int(input())

while N!=0:
    s=[]
    for i in range(int(N/4)):
        s.append(int(input()))
    print(sum(s))
    N=int(input())

Submission status: Accepted

Solution code:
while(True):
    N = int(input())
    if N==0:
        break
    time = N // 4
    goukei = 0
    for i in range(time):
        ipt = int(input())
        goukei += ipt
    print(goukei)

Submission status: Accepted

Solution code:
while True:
	n=int(input())
	if n==0:
		exit()
	ans=0
	for i in range(n//4):
		x=int(input())
		ans+=x
	print(ans)

Submission status: Accepted

Solution code:

while True:

    n = int(input())
    ans = 0

    if n == 0:
        break

    for i in range(n//4):
        a = int(input())
        ans += a

    print (ans)

Submission status: Accepted

Solution code:
def main(n):
    if n == 0:
        return False
    ans = 0
    for _ in range(int(n/4)):
        ans += int(input())
    print(ans)
    return True

while main(int(input())):
    pass

Submission status: Accepted

Solution code:
while True:

    inp = int(input())

    if inp == 0:
        break

    times = int(inp / 4)

    sum = 0

    for i in range(times):
        sum += int(input())

    print(sum)

Submission status: Accepted

Solution code:
import sys
n=int(input())
A=[]
def kyuudou(n):
    sum=0
    for i in range(n//4):
        hit=int(input())
        sum+=hit
    A.append(sum)
    ni=int(input())
    if ni==0:
        sys.exit
    else:   
        kyuudou(ni)
kyuudou(n)
for j in range(len(A)):
    print(A[j])

Submission status: Accepted

Solution code:
while True:
    game_count = int(input()) // 4
    if game_count == 0:
        break
    hit_count = 0
    
    for _ in range(game_count):
        hits = int(input())
        hit_count += hits
    print(hit_count)

Submission status: Accepted

Solution code:
while True:
  n = int(input())
  if n == 0:
    break
  print(sum([int(input()) for _ in range(n // 4)]))

Submission status: Accepted

Solution code:
while 1:
    n=int(input())
    if n==0:
        break
    print(sum([int(input()) for _ in range(n//4)]))

Submission status: Accepted

Solution code:
while 1:
    n=int(input())//4
    if n==0:break
    ans=0
    for i in range(n):
        ans+=int(input())
    print(ans)

Submission status: Accepted

Solution code:
while 1:
    n = int(input())
    if n == 0:
        break

    ans = 0
    for _ in range(n//4):
        ans += int(input())

    print(ans)

Submission status: Accepted

Solution code:
n=int(input())
while n:
    a=0
    for i in range(n//4):
        a+=int(input())
    print(a)
    n=int(input())

Submission status: Accepted

Solution code:
for n in iter(input,'0'):print(sum(int(input())for _ in[0]*(int(n)//4)))

Submission status: Runtime Error

Solution code:
while true:
    n=input()
    if n==0: break
    print sum(input() for i in xrange(n/4))

Submission status: Runtime Error

Solution code:
while true:
    n =input()
    if n == 0: break
    print sum(input() for i in xrange(n/4))

Submission status: Runtime Error

Solution code:
while True:
    n=input()
    if n==0: break
    print ans(input() for i in range(n/4))

Submission status: Runtime Error

Solution code:
while True:
    n = input()
    if n == 0: break
    print ans(input() for i in range(n/4))

Submission status: Runtime Error

Solution code:
while True:
    n = int(input())
    if n == 0: break
    print(sum([int(input()) for _ in range(n)]))

Submission status: Runtime Error

Solution code:
while True:
    n = int(raw_input())
    if n == 0: break
    a = []
    for i in range(n/4):
        a.append(int(raw_input())
    print sum(a)