import java.util.*; public class Main{ public static void main(String[] args) { Scanner cin = new Scanner(System.in); char[] s = cin.next().toCharArray(); int n = s.length; //用curSum来保存已有计算结果 //sum计算4种情况之和 int sum = 0, curSum = 0; for (int i = 0; i < 4; ++i) { ...