CF42C Safe cracking

题目描述

Right now you are to solve a very, very simple problem — to crack the safe. Four positive integers stand one by one on a circle protecting the safe. You know that to unlock this striking safe you have to make all four numbers equal to one. Operations are as follows: you may choose two adjacent numbers and increase both by one; you may choose two adjacent even numbers and divide both by two. Nothing else. Crack the safe!

输入格式

一行,四个用空格分开的正整数,分别代表四个在圆上的数字,这四个数都不大于10^9。

输出格式

如果有多于一个解法,输出其中任意一个即可。