Problem: 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.

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
public class lp{ 
static long floor(double d)
{
       if(d>=0)
         return (long)(d);
       else{
              double diff = d -(long)(d);
              if(diff==0)
                return (long)(d);
              else{
                    long z = (long)(d);
                         z--; 
                  return z;
              }
       }
}
public static void main(String[] args)throws Exception
{  
int n = ni();
double dr[] = ad(n);
long ar[] = new long[n];
long sum=0;
for(int i=0;i<n;i++)
 {
     ar[i] = floor(dr[i]);
     sum = sum+ar[i];
 }
int i=0;
while(sum!=0)
{
    if(((double)(ar[i])-dr[i])!=0.0)
       {
           sum++;
           ar[i]++;
       }
     i++;
}
   for( i=0;i<n;i++)
     pn(ar[i]);

                        out.flush(); 
}
static class pair
	{
		int a,b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
		@Override
		public int hashCode(){return (a+" "+b).hashCode();}
		@Override public boolean equals(Object c){if(a==((pair)c).a&&b==((pair)c).b)return true;return false;}
	} 
static int get(int index)
        {
                return (index&(-index));
        }
static void add(int bit[],int index,int val)
        {
             while(index<bit.length)
               {
                    bit[index] = bit[index]+val;
                    index = index + get(index);
               }
        }
static int get(int bit[],int index)
         {
               int sum=0;
               while(index>0)
                {
                    sum = sum+bit[index];
                    index = index-get(index);
                }
              return sum;
         }
static void add(long bit[],int index,long val)
        {
             while(index<bit.length)
               {
                    bit[index] = bit[index]+val;
                    index = index + get(index);
               }
        }
static long get(long bit[],int index)
         {
               long sum=0;
               while(index>0)
                {
                    sum = sum+bit[index];
                    index = index-get(index);
                }
              return sum;
         } 
static void compress(int a[])
         {      
                int n = a.length;
                Integer ar[] = new Integer[n];
                for(int i=0;i<n;i++)
                     ar[i] = a[i];
                Arrays.sort(ar);
                HashMap<Integer,Integer> hm = new HashMap();
                int st=1;
                for(int i=0;i<n;i++)
                    if(!hm.containsKey(ar[i]))
                        hm.put(ar[i],st++);
                for(int i=0;i<n;i++)
                   a[i] = hm.get(a[i]);
         }
static int find(int x,int p[]){ if(x==p[x]) return x; return p[x]=find(p[x],p) ;}
static void union(int x,int y,int p[]){ int xr=find(x,p),yr=find(y,p); if(xr!=yr){ p[xr]=yr;} }
 
static int abs(int x){ return x>0 ? x : -x; }
static long abs(long x){ return x>0 ? x : -x; }
static long gcd(long a,long b){ if(a==0)return b; if(b==0) return a;if(b%a==0) return a;return gcd(b%a,a); }
static int gcd(int a,int b){ if(a==0)return b; if(b==0) return a; if(b%a==0) return a;return gcd(b%a,a); }
static long min(long a,long b){ return a<b ? a : b; }
static int min(int a,int b){ return a<b ? a : b; }
static long max(long a,long b){ return a>b ? a : b; }
static int max(int a,int b){ return a>b ? a : b; }
static long pow(long a,long b,long md){ long ans=1;  while(b>0){if(b%2==1) ans = (ans*a)%md; a = (a*a)%md; b = b/2;} return ans; }
static int log2n(long a){ int te=0; while(a>0) {a>>=1; ++te; } return te; }

static void reverse(int a[]){int i1=0,i2=a.length-1; while(i1<i2){int t = a[i1];a[i1]=a[i2];a[i2]=t;i1++;i2--;}  } 
static void reverse(long a[]){ int i1=0,i2=a.length-1; while(i1<i2){ long t = a[i1]; a[i1]=a[i2];a[i2]=t;i1++;i2--;}  } 

static void subtract_1(char s[]){if(s[0]=='0') return;int n = s.length,i=n-1;while(s[i]=='0')i--;s[i] =(char)((int)(s[i]-'0') + 47);for(int j=i+1;j<n;j++)s[j]='9';}
static void reverse(char s[]){int i1=0,i2=s.length-1; while(i1<i2){char t=s[i1];s[i1]=s[i2];s[i2]=t; i1++;i2--;} }
static String reverse(String r){String s = "";int i= r.length()-1; while(i>=0){ s=s+r.charAt(i);i--;}return s;}
static boolean pal(char s[]){ int i1=0,i2=s.length-1; while(i1<i2){ if(s[i1]!=s[i2]) return false; i1++;i2--;} return true;}
static boolean pal(String s){int n = s.length(),i1=0,i2=n-1;while(i1<i2){if(s.charAt(i1)!=s.charAt(i2))return false;i1++; i2--;}return true;}
 
// Input OutPut Functions
static PrintWriter out = new PrintWriter(System.out);
static FastReader sc=new FastReader();
static int ni(){ int x = sc.nextInt();return(x); }
static long nl(){ long x = sc.nextLong(); return(x); }
static String n(){ String str = sc.next(); return(str); }
static String ns(){ String str = sc.nextLine(); return(str);}
static double nd(){double d = sc.nextDouble(); return(d); }
static int[] ai(int n){ int a[] = new int[n]; for(int i=0;i<n;i++) a[i] = ni(); return a; }
static long[] al(int n) {long a[] = new long[n]; for(int i=0;i<n;i++) a[i] = nl(); return a; }
static double[] ad(int n) { double a[]= new double[n]; for(int i=0;i<n;i++) a[i]=nd(); return a;} 
static String[] as(int n){ String a[] = new String[n]; for(int i=0;i<n;i++) a[i] = n(); return a; }
static void p(Object o){ out.print(o); }
static void pn(Object o){ out.println(o); } 
 
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;} 
  } 
}