import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); // your code goes here for(int m=1;m 0) nwcoord=currcoord-a; else nwcoord=-1; return nwcoord; } }