Vus the Cossack has n real numbers a_i. It is known that the sum of all numbers is equal to 0. He wants to choose a sequence b the size of which is n such that the sum of all numbers is 0 and each b_i is either ⌊ a_i ⌋ or ⌈ a_i ⌉. In other words, b_i equals a_i rounded up or down. It is not necessary to round to the nearest integer.

For example, if a = [4.58413, 1.22491, -2.10517, -3.70387], then b can be equal, for example, to [4, 2, -2, -4]. 

Note that if a_i is an integer, then there is no difference between ⌊ a_i ⌋ and ⌈ a_i ⌉, b_i will always be equal to a_i.

Help Vus the Cossack find such sequence!

Input

The first line contains one integer n (1 ≤ n ≤ 10^5) — the number of numbers.

Each of the next n lines contains one real number a_i (|a_i| < 10^5). It is guaranteed that each a_i has exactly 5 digits after the decimal point. It is guaranteed that the sum of all the numbers is equal to 0.

Output

In each of the next n lines, print one integer b_i. For each i, |a_i-b_i|<1 must be met.

If there are multiple answers, print any.

Examples

Input


4
4.58413
1.22491
-2.10517
-3.70387


Output


4
2
-2
-4


Input


5
-6.32509
3.30066
-0.93878
2.00000
1.96321


Output


-6
3
-1
2
2

Note

The first example is explained in the legend.

In the second example, we can round the first and fifth numbers up, and the second and third numbers down. We can round the fourth number neither up, nor down.
//Author: Patel Rag
//Java version "1.8.0_211"
import java.util.*;
import java.io.*;

public class Main
{
  Reader fr;
  Print log;
  static class Reader
  {
    private byte[] buffer = new byte[1024];
    private int index;
    private InputStream in;
    private int total;
    public Reader()
    {
        in = System.in;
    }
    public Reader(InputStream in)
    {
      this.in = in;
    }
    private int scan() throws IOException
    {
        if(total < 0)
        {
          throw new InputMismatchException();
        }
        if(index >= total)
        {
            index = 0;
            total = in.read(buffer);
            if(total <= 0)
            {
              return -1;
            }
        }
        return buffer[index++];
    }
    public final int nextInt() throws IOException
    {
      return (int)nextLong();
    }
    public final long nextLong() throws IOException
    {
        int integer = 0;
        int n = scan();
        while(isWhiteSpace(n))
        {
          n = scan();
        }
        int neg = 1;
        if(n == '-')
        {
            neg = -1;
            n = scan();
        }
        while(!isWhiteSpace(n))
        {
            if(n >= '0' && n <= '9')
            {
                integer *= 10;
                integer += n - '0';
                n = scan();
            }
            else
            {
              throw new InputMismatchException();
            }
        }
        return neg*integer;
    }
    public final double nextDouble() throws IOException
    {
        double doub = 0;
        int n = scan();
        while(isWhiteSpace(n))
        {
          n=scan();
        }
        int neg = 1;
        if(n == '-')
        {
            neg = -1;
            n = scan();
        }
        while(!isWhiteSpace(n) && n != '.')
        {
            if(n >= '0' && n <= '9')
            {
                doub *= 10;
                doub += n-'0';
                n = scan();
            }
            else
            {
              throw new InputMismatchException();
            }
        }
        if(n == '.')
        {
            n = scan();
            double temp = 1;
            while(!isWhiteSpace(n))
            {
                if(n >= '0' && n <= '9')
                {
                    temp/=10;
                    doub += (n-'0')*temp;
                    n = scan();
                }
                else
                {
                  throw new InputMismatchException();
                }
            }
        }
        return neg*doub;
    }
    public final String next() throws IOException
    {
        StringBuilder sb = new StringBuilder();
        int n = scan();
        while(isWhiteSpace(n))
        {
          n = scan();
        }
        while(!isWhiteSpace(n))
        {
            sb.append((char)n);
            n = scan();
        }
        return sb.toString();
    }
    public final String nextLine() throws IOException
    {
      StringBuilder sb = new StringBuilder();
      int n = scan();
      while(isWhiteSpace(n))
      {
        n = scan();
      }
      while(n != '\n' && n != '\r' && n != -1)
      {
        sb.append((char)n);
        n = scan();
      }
      return sb.toString();
    }
    private boolean isWhiteSpace(int n)
    {
        if(n == ' ' || n == '\n'|| n == '\r' || n == '\t'|| n == -1)
        return true;
        return false;
    }
  }
  static class FastReader
  {
    BufferedReader br;
    StringTokenizer st;

    public FastReader()
    {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next()
    {
      while (st == null || !st.hasMoreElements())
      {
        try
        {
          st = new StringTokenizer(br.readLine());
        }
        catch (IOException  e)
        {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

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

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

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

    String nextLine()
    {
      String str = "";
      try
      {
        str = br.readLine();
      }
      catch (IOException e)
      {
        e.printStackTrace();
      }
      return str;
    }
    void close() throws IOException
    {
      br.close();
    }
  }
  static class Print
  {
      private final BufferedWriter bw;
      public Print()
      {
          this.bw = new BufferedWriter(new OutputStreamWriter(System.out));
      }
      public void print(Object object)throws IOException
      {
          bw.append(""+object);
      }
      public void println(Object object)throws IOException
      {
          print(object);
          bw.append("\n");
      }
      public void close()throws IOException
      {
          bw.close();
      }
  }
  static long modExp(long x, long n, long mod)    //Modular exponentiation
  {
    long result = 1;
    while(n > 0)
    {
        if(n % 2 == 1)
            result = (result%mod * x%mod)%mod;
        x = (x%mod * x%mod)%mod;
        n=n/2;
    }
    return result;
  }
  static long gcd(long a, long b)
  {
    if(a==0) return b;
    return gcd(b%a,a);
  }
  static String swap(String a,int i, int j)
  {
    char temp;
    char[] s1 = a.toCharArray();
    temp = s1[i];
    s1[i] = s1[j];
    s1[j] = temp;
    return String.valueOf(s1);
  }
  public static void main(String[] args)
  throws IOException
  {
    Reader fr = new Reader();
    Print log = new Print();
    int n = fr.nextInt();
    ArrayList<Double> a = new ArrayList<>(n);
    boolean[] f = new boolean[n];
    double sum = 0;
    for(int i = 0; i < n; i++)
    {
      double v = fr.nextDouble();
      if(v != Math.floor(v))
      {
        f[i] = true;
        v = Math.floor(v);
      }
      a.add(v);
      sum = sum + v;
    }
    if(sum < 0)
    {
      int i = 0;
      while(sum < 0)
      {
        if(f[i])
        {
          sum++;
          a.set(i, a.get(i) + 1);
        }
        i++;
      }
    }
    for(int i = 0; i < n; i++) log.println((int)(double)a.get(i));

    log.close();
  }
}
class Pair<U, V>  // Pair class
{
    public final U first;       // first field of a Pair
    public final V second;      // second field of a Pair

    private Pair(U first, V second)
    {
      this.first = first;
      this.second = second;
    }

    @Override
    public boolean equals(Object o)
    {
      if (this == o) return true;

      if (o == null || getClass() != o.getClass()) return false;

      Pair<?, ?> pair = (Pair<?, ?>) o;

      if (!first.equals(pair.first)) return false;
      return second.equals(pair.second);
    }

    @Override
    public int hashCode()
    {
      return 31 * first.hashCode() + second.hashCode();
    }

    public static <U, V> Pair <U, V> of(U a, V b)
    {
      return new Pair<>(a, b);
    }
}
class myComp implements Comparator<Pair>
{
  public int compare(Pair a,Pair b)
  {
    if((Integer)a.second > (Integer)b.second) return -1;
    if((Integer)a.second < (Integer)b.second) return 1;
    if((Integer)a.first > (Integer)b.first) return 1;
    return -1;
  }
}
class BIT       //Binary Indexed Tree
{
  public long[] m_array;

  public BIT(long[] dat)
  {
    m_array = new long[dat.length + 1];
    Arrays.fill(m_array,0);
    for(int i = 0; i < dat.length; i++)
    {
      m_array[i + 1] = dat[i];
    }
    for(int i = 1; i < m_array.length; i++)
    {
      int j = i + (i & -i);
      if(j < m_array.length)
      {
        m_array[j] = m_array[j] + m_array[i];
      }
    }
  }

  public final long prefix_query(int i)
  {
    long result = 0;
    for(++i; i > 0; i = i - (i & -i))
    {
      result = result + m_array[i];
    }
    return result;
  }

  public final long range_query(int fro, int to)
  {
    if(fro == 0)
    {
      return prefix_query(to);
    }
    else
    {
      return (prefix_query(to) - prefix_query(fro - 1));
    }
  }

  public void update(int i, long add)
  {
    for(++i; i < m_array.length; i = i + (i & -i))
    {
      m_array[i] = m_array[i] + add;
    }
  }
}
