#include <bits/stdc++.h>
int main(void) {
  int a = 1, n;
  char c;
  while (scanf("%d%c %*c %*c %*c", &n, &c), n != 0) {
    if (c == ' ') {
      clock_t c1 = clock();
      clock_t c2 = (clock_t)(a * 0.1 * CLOCKS_PER_SEC + c1);
      while (clock() < c2)
        ;
      return 0;
    }
    ++a;
  }
}
