public class Test {
public static void main(String[] args) {
int i = -60, j, n = 10000 - 300;
while (n > 0) {
n += 300;
i += 60;
for (j = i + 60; i < j && n > 0; i++)
n -= 10;
}
System.out.print(i);
}
}
public class Test {
public static void main(String[] args) {
int i = -60, j, n = 10000 - 300;
while (n > 0) {
n += 300;
i += 60;
for (j = i + 60; i < j && n > 0; i++)
n -= 10;
}
System.out.print(i);
}
}