#-------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
#-------------------------------------------------------------

X = read($1);

R = X;
for(i in 1:6){

  if(i %% 2 == 1)
    R = R + 1 / 2;
  else
    R = t(R) %*% R;

  R = R * 3;

  for(j in 1:8){
    R = R + 11

    if (j %% 4 == 0)
      R = R / 5

    for(k in 1:10){
      R = R + 99
      if (k %% 4 == 0)
        R = R * 2
    }
  }

  if (i %% 2 == 0)
    R = t(R) %*% R;

  for(k in 1:3){
    for(k in 1:7){
      R = t(R) %*% R;
    }
  }
}

R = R * 3;

write(R, $2, format="text");
