fork download
  1. Program planeville;
  2. const
  3. MAXN = 100000;
  4.  
  5. var
  6. N, S, i : LongInt;
  7. V : Array[0..MAXN-1] of LongInt;
  8.  
  9. begin
  10. {
  11.   uncomment the two following lines if you want to read/write from files
  12.   assign(input, 'input.txt'); reset(input);
  13.   assign(output, 'output.txt'); rewrite(output);
  14. }
  15.  
  16. ReadLn(N);
  17.  
  18. for i:=0 to N-1 do
  19. Read(V[i]);
  20. ReadLn();
  21.  
  22. S := 0;
  23.  
  24. for i:=0 to N do S:=S+(V[i]+2);
  25.  
  26.  
  27. WriteLn(S);
  28.  
  29. end.
  30.  
Success #stdin #stdout 0s 5324KB
stdin
9
5 4 3 2 1 2 3 4 5
stdout
49