Problem: Another Codeforces Round has just finished! It has gathered n participants, and according to the results, the expected rating change of participant i is a_i. These rating changes are perfectly balanced — their sum is equal to 0.

Unfortunately, due to minor technical glitches, the round is declared semi-rated. It means that all rating changes must be divided by two.

There are two conditions though: 

  * For each participant i, their modified rating change b_i must be integer, and as close to (a_i)/(2) as possible. It means that either b_i = ⌊ (a_i)/(2) ⌋ or b_i = ⌈ (a_i)/(2) ⌉. In particular, if a_i is even, b_i = (a_i)/(2). Here ⌊ x ⌋ denotes rounding down to the largest integer not greater than x, and ⌈ x ⌉ denotes rounding up to the smallest integer not smaller than x. 
  * The modified rating changes must be perfectly balanced — their sum must be equal to 0. 



Can you help with that?

Input

The first line contains a single integer n (2 ≤ n ≤ 13 845), denoting the number of participants.

Each of the next n lines contains a single integer a_i (-336 ≤ a_i ≤ 1164), denoting the rating change of the i-th participant.

The sum of all a_i is equal to 0.

Output

Output n integers b_i, each denoting the modified rating change of the i-th participant in order of input.

For any i, it must be true that either b_i = ⌊ (a_i)/(2) ⌋ or b_i = ⌈ (a_i)/(2) ⌉. The sum of all b_i must be equal to 0.

If there are multiple solutions, print any. We can show that a solution exists for any valid input.

Examples

Input


3
10
-5
-5


Output


5
-2
-3


Input


7
-7
-29
0
3
24
-29
38


Output


-3
-15
0
2
12
-15
19

Note

In the first example, b_1 = 5, b_2 = -3 and b_3 = -2 is another correct solution.

In the second example there are 6 possible solutions, one of them is shown in the example output.

Solution (in JAVA):

Solution:

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

public class Contest {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Contest().run();
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time(ms) = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    class MyComparator implements Comparable<MyComparator> {

        int x;
        int y;

        public MyComparator(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(MyComparator a) {
            if (x == a.x) {
                return (y - a.y);
            }
            return x - a.x;
        }
    }

    public static boolean isPrime(int num) {
        if (num > 2 && num % 2 == 0) {
            //System.out.println(num + " is not prime");
            return false;
        }
        int top = (int) Math.sqrt(num) + 1;
        for (int i = 3; i < top; i += 2) {
            if (num % i == 0) {
                //System.out.println(num + " is not prime");
                return false;
            }
        }
        //System.out.println(num + " is prime");
        return true;
    }

    private static long gcd(long a, long b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.longValue();
    }

    public void solveD() throws IOException {

    }

    public void solveС() throws IOException {
        
    }

    public void solveB() throws IOException {
        

    }

    public void solve() throws IOException {
        int n = readInt();
        int[] array = new int[n];
        for(int i=0; i<n;i++) {
            array[i] = readInt();
        }
        boolean added = false;
        for(int i=0; i<n;i++) {
            if(array[i]%2 == 0) {
                System.out.println(array[i]/2);
                continue;
            }
            if((!added && array[i] > 0) || (added && array[i] < 0)) {
                System.out.println(array[i]/2);
                added = !added;
            } else  {
                System.out.println((array[i]/2)+array[i]/Math.abs(array[i]));
                added = !added;
            }
        }
    }

    /**
     *
     * @param a
     * @param b
     * @return
     */
    private BigInteger lcm(BigInteger a, BigInteger b) {
        return a.multiply(b.divide(a.gcd(b)));
    }

    public class LimitedQueue<E> extends LinkedList<E> {

        private int limit;

        public LimitedQueue(int limit) {
            this.limit = limit;
        }

        @Override
        public boolean add(E o) {
            super.addFirst(o);
            if (size() > limit) {
                super.removeLast();
            }
            return true;
        }
    }

}