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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

import javafx.util.Pair;

public class Main {

    static long MOD = 0;
    static long[] fact = new long[1];

    public static void main(String[] args) throws Exception {
        long startTime = System.nanoTime();
        int t = 1;
        while (t-- > 0) {
            solve();
        }
        long endTime = System.nanoTime();
        err.println("Execution Time : +" + (endTime - startTime) / 1000000 + " ms");
        exit(0);
    }

    static void solve() {
        int n = in.nextInt();
        ArrayList<Integer> sol = new ArrayList<>();
        ArrayList<Integer> orig = new ArrayList<>();
        double pend = 0;
        for (int i = 0; i < n; i++) {
            int v = in.nextInt();
            if (v > 0 && v % 2 != 0) {
                pend += 0.5;
            }
            if (v < 0 && v % 2 != 0) {
                pend -= 0.5;
            }
            sol.add(v / 2);
            orig.add(v);
        }
        if (pend == 0) {
            for (int a : sol) {
                out.println(a);
            }
        } else {
            for (int i = 0; i < orig.size(); i++) {
                if (orig.get(i) % 2 != 0) {
                    if (pend != 0) {
                        if (orig.get(i) < 0) {
                            out.println((sol.get(i) - 1));
                            pend++;
                        } else {
                            out.println((sol.get(i) + 1));
                            pend--;
                        }
                    }else{
                        out.println((sol.get(i)));
                    }
                } else {
                    out.println((sol.get(i)));
                }
            }
        }
    }

    static int valuesGreaterThan(ArrayList<Integer> d, int v) {
        int ind = Collections.binarySearch(d, v);
        if (ind < 0) {
            ind *= -1;
            ind--;
        } else {
            ind++;
        }
        return d.size() - ind;
    }

    static <T> Pair<T, T> make_pair(T a, T b) {
        return new Pair<>(a, b);
    }

    static class ModularArithmetic {
        static long C(int n, int k) {
            return divide(fact[n], mul(fact[k], fact[n - k]));
        }

        static void precalc(int N) {
            fact = new long[N + 5];
            fact[0] = 1;
            for (int i = 1; i < N; i++)
                fact[i] = mul(fact[i - 1], i);
        }

        static long inv(long x) {
            return mod_pow(x, MOD - 2);
        }

        static long mul(long x, long y) {
            return (x * y) % MOD;
        }

        static long divide(long x, long y) {
            return mul(x, inv(y));
        }

        static long add(long x, long y) {
            x += y;
            while (x >= MOD)
                x -= MOD;
            while (x < 0)
                x += MOD;
            return x;
        }

        static long mod_pow(long x, long y) {
            if (y == 0) {
                return 1;
            }
            if (y == 1) {
                return x;
            }
            long v = mod_pow(x, y / 2);
            if ((y & 1) > 0) {
                return v * v % MOD * x % MOD;
            }
            return v * v % MOD;
        }
    }

    static class StringUtils {
        static char[] constructReverseWithHash(String s) {
            char[] a = s.toCharArray();
            char[] b = ArrayUtils.reverse(s.toCharArray());
            char[] c = new char[a.length + b.length + 1];
            System.arraycopy(a, 0, c, 0, a.length);
            c[a.length] = '#';
            System.arraycopy(b, 0, c, a.length + 1, b.length);
            return c;
        }

        static String reverse(String s) {
            return constructStringFromChars(ArrayUtils.reverse(s.toCharArray()), 0, s.length());
        }

        static String constructStringFromChars(char[] d, int from, int to) {
            StringBuilder res = new StringBuilder();
            for (int i = from; i < to; i++) {
                res.append(d[i]);
            }
            return res.toString();
        }

        static String constructStringFromInts(int[] d, int from, int to) {
            StringBuilder res = new StringBuilder();
            for (int i = from; i < to; i++) {
                res.append(d[i]);
            }
            return res.toString();
        }

        static String constructStringFromInts(int[] d, int from, int to, char delim) {
            StringBuilder res = new StringBuilder();
            for (int i = from; i < to; i++) {
                res.append(d[i]);
                res.append(delim);
            }
            return res.toString();
        }

        static int[] prefix_function(char[] s) {
            int n = s.length;
            int[] pi = new int[n];
            for (int i = 1; i < n; i++) {
                int j = pi[i - 1];
                while (j > 0 && s[i] != s[j])
                    j = pi[j - 1];
                if (s[i] == s[j]) {
                    j++;
                }
                pi[i] = j;
            }
            return pi;
        }
    }

    static class NumberTheory {

        static ArrayList<Integer>[] getDivisors(int n) {
            ArrayList<Integer>[] d = new ArrayList[n + 1];
            for (int i = 1; i <= n; i++) {
                d[i] = new ArrayList<>();
            }
            for (int i = 1; i <= n; i++) {
                for (int j = i; j <= n; j += i) {
                    d[j].add(i);
                }
            }
            return d;
        }

        static long mod_pow(long x, long y, long MOD) {
            if (y == 0) {
                return 1;
            }
            if (y == 1) {
                return x;
            }
            long v = mod_pow(x, y / 2, MOD);
            if ((y & 1) > 0) {
                return v * v % MOD * x % MOD;
            }
            return v * v % MOD;
        }

        static int gcd(int a, int b) {
            while (b != 0) {
                int t = b;
                b = a % b;
                a = t;
            }
            return a;
        }

        //GCD Long
        static long gcd(long a, long b) {
            while (b != 0) {
                long t = b;
                b = a % b;
                a = t;
            }
            return a;
        }

    }

    static class ArrayUtils {

        static int[] reverse(int[] data) {
            int[] p = new int[data.length];
            for (int i = 0, j = data.length - 1; i < data.length; i++, j--) {
                p[i] = data[j];
            }
            return p;
        }

        static char[] reverse(char[] data) {
            char[] p = new char[data.length];
            for (int i = 0, j = data.length - 1; i < data.length; i++, j--) {
                p[i] = data[j];
            }
            return p;
        }

        static int[] MegreSort(int[] A) {
            if (A.length > 1) {
                int q = A.length / 2;
                int[] left = new int[q];
                int[] right = new int[A.length - q];
                System.arraycopy(A, 0, left, 0, q);
                System.arraycopy(A, q, right, 0, A.length - q);
                int[] left_sorted = MegreSort(left);
                int[] right_sorted = MegreSort(right);
                return Megre(left_sorted, right_sorted);
            } else {
                return A;
            }
        }

        static int[] Megre(int[] left, int[] right) {
            int[] A = new int[left.length + right.length];
            int i = 0;
            int j = 0;
            for (int k = 0; k < A.length; k++) {
                // To handle left becoming empty
                if (i == left.length && j < right.length) {
                    A[k] = right[j];
                    j++;
                    continue;
                }
                // To handle right becoming empty
                if (j == right.length && i < left.length) {
                    A[k] = left[i];
                    i++;
                    continue;
                }
                if (left[i] <= right[j]) {
                    A[k] = left[i];
                    i++;
                } else {
                    A[k] = right[j];
                    j++;
                }
            }
            return A;
        }

        static long[] MegreSort(long[] A) {
            if (A.length > 1) {
                int q = A.length / 2;
                long[] left = new long[q];
                long[] right = new long[A.length - q];
                System.arraycopy(A, 0, left, 0, q);
                System.arraycopy(A, q, right, 0, A.length - q);
                long[] left_sorted = MegreSort(left);
                long[] right_sorted = MegreSort(right);
                return Megre(left_sorted, right_sorted);
            } else {
                return A;
            }
        }

        static long[] Megre(long[] left, long[] right) {
            long[] A = new long[left.length + right.length];
            int i = 0;
            int j = 0;
            for (int k = 0; k < A.length; k++) {
                // To handle left becoming empty
                if (i == left.length && j < right.length) {
                    A[k] = right[j];
                    j++;
                    continue;
                }
                // To handle right becoming empty
                if (j == right.length && i < left.length) {
                    A[k] = left[i];
                    i++;
                    continue;
                }
                if (left[i] <= right[j]) {
                    A[k] = left[i];
                    i++;
                } else {
                    A[k] = right[j];
                    j++;
                }
            }
            return A;
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public int[] readAllInts(int n) {
            int[] p = new int[n];
            for (int i = 0; i < n; i++) {
                p[i] = in.nextInt();
            }
            return p;
        }

        public int[] readAllInts(int n, int s) {
            int[] p = new int[n + s];
            for (int i = s; i < n + s; i++) {
                p[i] = in.nextInt();
            }
            return p;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static void exit(int a) {
        out.close();
        err.close();
        System.exit(a);
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static OutputStream errStream = System.err;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);
    static PrintWriter err = new PrintWriter(errStream);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

}