fork download
  1. class Main
  2. {
  3. public static void main (String[] args)
  4. {
  5. java.util.Scanner in = new java.util.Scanner(System.in);
  6. int a = in.nextInt(), b = in.nextInt(), n = in.nextInt(), k;
  7. k = (int)Math.ceil((double)(n - b) / (b - a));
  8. System.out.println(2 * k + 1);
  9. }
  10. }
Success #stdin #stdout 0.1s 35308KB
stdin
1 3 6
stdout
5