class TimeAndAgain
{
   public static void main(String[] args)
   {
      boolean[] b = {true,false,false,false,true,true,false};
      System.out.println(f(b));
   }

   static boolean f(boolean[] b)
   {
      boolean h = true;
     
      for(int i = (b.length-1); i > 0; i--)
      {
         if(b[i] & b[i-1])
         {
            h = b[i];
         }
         else
         {
            h = b[i-1] & h;
         }
      }

      return h;
   } 
}