using System;
public class Program
{
public static void Main()
int[] arr = new int[]{1,0,0,0,1};
int[] newArr = new int[10];
for(int i = 0; arr.Length-1 >= i; i++)
if(arr[i] == 1)
newArr[i] = arr[i];
}
for(int j = 0; newArr.Length-1>j; j++)
Console.WriteLine(newArr[j]);