не проходит последнее условие...... помогите!!!
package com.javarush.task.task04.task0424;
/*
Три числа
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String S = reader.readLine();
String X = reader.readLine();
String Z = reader.readLine();
int s = Integer.parseInt(S);
int x = Integer.parseInt(X);
int z = Integer.parseInt(Z);
if (s != x && s != z && x != z)
System.out.println();
else if (s != x && s != z)
System.out.println("1");
else if (x != s && x != z)
System.out.println("2");
else if (z != s && z != x)
System.out.println("3");
}
}